Re: Re: Making functions available from another script

From: Date: Mon, 07 Nov 2005 09:53:09 +0000
Subject: Re: Re: Making functions available from another script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225233@lists.php.net to get a copy of this message
Richard Leclair wrote:
Hi Norbert, Thanks for your reply. Yeah, you were almost there - it wasn't quite what I had in mind. I probably should have elaborated on this one. I'm looking at building up a library of handy functions that can be included in a current script. Only problem is: (let's just say for clarity that lib.php <==> A.php; same).. If I declare the functions in lib.php, then B.php can include lib.php but cannot execute any functions within B.php (that were declared in lib.php). it keeps coming up as "function undeclared". Any more ideas/thoughts? Or have I not gone about this correctly?
Maybe post your lib.php and B.php, but from your description I have no idea what might cause this problem. For testing maybe change your lib.php to sth like this ---lib.php-------------------- <code>included lib.php</code> <?php echo('lib.php works'); //let your code follow here ?> Norbert

« previous php.general (#225233) next »