RE: [PHP] The Include Eludes

From: Date: Mon, 27 Nov 2000 07:19:11 +0000
Subject: RE: [PHP] The Include Eludes
Groups: php.general 
Request: Send a blank email to php-general+get-27312@lists.php.net to get a copy of this message
when you'll be awake: if you ever used require() successfully then with include() NOTHING should change in your paths. example: assuming that require('/home/httpd/html/site/this/file.inc') worked for you since the beginning of times: then include('/home/httpd/html/site/this/file.inc') will work there just as well. Try simply to replace the function names on a test script that already runs perfectly with require() and you will understand the difference; Cheers, Maxim Maletsky. -----Original Message----- From: Joseph H Blythe [mailto:joe.blythe@binarylogic.com.au] Sent: Monday, November 27, 2000 3:01 PM To: Lawrence.Sheed@dfait-maeci.gc.ca; PHP-General Subject: Re: [PHP] The Include Eludes Lawrence.Sheed@dfait-maeci.gc.ca wrote: > > Have you tried using $DOCUMENT_ROOT to get the root directory of your web > pages. > > eg > > if your files are in > > /inc/somefile.php (from a web browser), then the php could be: > > include $DOCUMENT_ROOT . "inc/somefile.php"; > > I use that quite often for my require/includes. > > I can give you some help if you need it. > > Cheers, > > Lawrence. > I need to be able to use the includes from user directories as this is how I develop the websites, I generally don't use the webservers document root as I can not easily ftp files straight to it as it is user:group nobody and I am writing the scripts from a windows box, which would mean I would have to ftp the files to a users home dir then su to root and move the files into the webservers document tree, which is a real pain. Geez its time to knock off, I'll try and sort this out tommorrow as I really need to understand why this isn't working. Thanks for your help, mutch appreciated :-) Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#27312) next »