it seems possible that this is the problem, you called it, "checkLoggedIn()" in your script then tried to call, "checkloggedin()". Notice the caps aren't there when you tried to call it. On Sat, 2 Oct 2004 17:20:07 +0100, Graham Cossey <graham@xxxxxxxxxxxxxxx> wrote: > Do you have <?php and ?> in functions.lib ? > > > > -----Original Message----- > From: Andrew W [mailto:aw@xxxxxxxxxx] > Sent: 02 October 2004 16:52 > To: php-gen > Subject: Including function libraries > > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- <<-------------------------------------------------------- Jasper Howard - Database Administration ApexEleven.com 530 559 0107 ------------------------------------------------------->> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php