Re: include_once()

From: Date: Wed, 20 Mar 2002 00:12:39 +0000
Subject: Re: include_once()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-89241@lists.php.net to get a copy of this message
No I haven't. Wouldn't this affect my entire web site ? I just need to include the files into a single script. Thanks, ______________________ Mauricio Cuenca ----- Original Message ----- From: "Neil Freeman" To: "Mauricio Cuenca" Cc: <php-general@lists.php.net> Sent: Tuesday, March 19, 2002 12:30 PM Subject: Re: [PHP] include_once() > Have you remembered to set up PHP's include_path to point to the area where > your scripts are located? > > Neil > > Mauricio Cuenca wrote: > > > Hello, > > > > I have a very long script with several functions in it. I wanted to split > > the script into several files, so I created two sub-scripts and one main > > script. This is the code from the main script: > > > > <?php > > > > include_once("sub_script_1.php"); > > incude_once("sub_script_2.php"); > > > > $temp = MyFunction(); > > > > ?> > > > > MyFunction() is contained in the file "sub_script_1.php" which is properly > > enclosed with valid PHP start and end tags. > > > > But When I try to run the main script, I get this error: > > Fatal error: Call to undefined function: MyFunction()in /main_script.php on > > line 4. > > > > How can I properly "divide" my script into several ones ??? > > > > TIA, > >

« previous php.general (#89241) next »