RE: [PHP-WIN] require producing following error

From: Date: Mon, 24 Jul 2000 13:42:45 +0000
Subject: RE: [PHP-WIN] require producing following error
Groups: php.windows 
Request: Send a blank email to php-windows+get-1257@lists.php.net to get a copy of this message
Is the common.php3 file in the wwwroot directory? if not, you will need to specify the common files directory. If that doesn't work. You may need to change the "/" to a "\" before the file name... I've also noticed that requiring one file from another required file can be tricky. I'm not exactly sure, but if you have say three files. 1) c:\wwwroot\first_file.php 2) c:\wwwroot\root_includes\root_include.php 3) c:\wwwroot\global_includes\global_include.php The first requires the second and then the second calls the third. Sometimes I think that the second include (if it uses a relative path of some sort) may actually look from the location of the first file. So that an include "..\global_includes\global_include.php" placed in the second file will come out as c:\global_includes\global_include.php as opposed to c:\wwwroot\global_includes\global_include.php which is what you want. In other words it is searching for the include that is in the second file as if it were coming from the first file (which has a different directory level). This might all be a lie. But I think that it works that way if you don't know what you are doing (like me). If you know what you are doing then you usually don't have silly problems like this (unlike me). Good Luck, John --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer Licking County, Ohio, USA 740-349-3631 > -----Original Message----- > From: Dave Johnston [SMTP:davjoh@interlog.com] > Sent: Sunday, July 23, 2000 5:15 PM > To: php-windows@lists.php.net > Subject: [PHP-WIN] require producing following error > > <?php > //require ("common.php3"); > ?> > > without the comment produces the following error: > > Fatal error: Failed opening required 'common.php3' in > c:\Inetpub\wwwroot/jobapp_action.php3 on line 6 > > Running PWS Win98 PHP3 -- the common.php3 file opens on its own. > > This is part of an exercise in Professional PHP Programming Chap 6 P 125 - > 127 > > Any help greatly appreciated > Dave > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#1257) next »