[PHP] Including function libraries

2004-10-02 Thread Andrew W
Ok, I've got a file called functions.lib which contains the following:
function checkLoggedIn()
{
return (true);
}
function Test ($x)
{
return ($x * $x);
}
and a file called test.php which contains the following:
?php
include 'functions.lib';
if (checkLoggedIn())
{
print Logged in;
}
else
{
print Not logged in;
}

?
They're both stored in a directory called 'test' which Ive uploaded to 
my webserver.  When I call test.php from my browser I get the following 
output:

 function checkLoggedIn() {  return (true); }  function Test ($x) {  
return ($x * $x); }
Fatal error: Call to undefined function: checkloggedin() in 
/home/sites/site116/web/test/test.php on line 5

Why can't I call the function defined in the lib file?
Thanks
AW



Re: [PHP] PHP include before or after Apache SSI?

2004-09-15 Thread Andrew W
On 13 Sep 2004, at 19:11, Ed Lazor wrote:
Why use SSI?  PHP's include directive allows you to bring separate 
pages
together for creating an overall page.  You can include .html files.  
Also,
PHP programming isn't *required* in a file with the php extension.
I had wondered about that but I must be using it wrong because when I 
include a section of code it doesn't include the source it includes the 
output - if that makes sense.

In other words suppose I had a file which contained the interfeace HTML 
and took an argument like this  file1.php?id=value

now suppose the actual PHP code which took that id=value and did some 
processing with it was in another file, file2.php, in order to get the 
value to file2.php file1 would have to include the following:

$id = $_REQUEST['id'];
include 'file1.php?id=$value';
In other words the arguments have to be passed accross twice.  What am 
I doing wrong?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP include before or after Apache SSI?

2004-09-13 Thread Andrew W
In which order do the two execute?  I'm trying to work out the best way 
to integrate PHP backend code with an HTML interface in the cleanest 
way possible - I don't really want to copy  paste the PHP into the 
HTML because it will make maintaining both the PHP  the HTML more 
complicated.

What I'd really like is to save the PHP backend separatly and link them 
into the HTML at the appropriate place using SSI.  Can someone offer 
some guidance on the best way to do this, I'm getting confused as to 
how's best to do it.  There are lots of sites out there that have lush 
UI's and fairly complex PHP yet they must somehow manage the two 
separately - after all they're usually done by different teams so how 
do they do it?

Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Cannot compile

2004-08-03 Thread Andrew W
I'm using Linux.
It doesn't work regardless of whether I include any options or not.
On 2 Aug 2004, at 04:14, Support wrote:
Sounds like configure did not work ok after all. :-)
Did you include any options? What os? Any clues you could offer would 
help.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Cannot compile

2004-08-01 Thread Andrew W
I've compiled  installed software from source before but PHP 5 is 
proving a challenge.

I've decompressed the tarball and cd into the directory.  Run 
./configure which seems to work ok but then when I do make I get the 
following error:

No targets specified and no makefile found
Sure enough there is no makefile in the directory so for some reason 
./configure isn't creating one.

Can anyone offer any help?
Thanks
AW
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php