RE: including files

From: Date: Wed, 22 Nov 2000 02:17:13 +0000
Subject: RE: including files
Groups: php.general 
Request: Send a blank email to php-general+get-26564@lists.php.net to get a copy of this message
include() looks only in the include_path specified in php.ini. In your case, this includes the current directory ".", and "/usr/local/lib/php". You can: 1. put application_dev_prod.php in either of those directories 2. add the directory "/httpd/php/application" to include_path in php.ini or 3. use require() -- http://www.php.net/require -Ben -----Original Message----- From: Paulson, Joseph V. "Jay" [mailto:jay.paulson@viatel.com] Sent: Tuesday, November 21, 2000 7:35 AM To: php-general@lists.php.net Subject: including files Hello everyone-- I have a simple question about including a file on a Unix machine. I have PHP4 installed on it and I'm trying to include a file that holds passwords to databases etc. I'm using the full path which is: /httpd/php/application/application_dev_prod.php Also, my code to include the file is as follows: include ("/httpd/php/application/application_dev_prod.php"); Lastly, here is the include error I am getting: Warning: Failed opening '/httpd/php/application/application_dev_prod.php' for inclusion (include_path='.:/usr/local/lib/php') in /httpd/htdocs/index.php on line 3 Thanks for any help! Jay

« previous php.general (#26564) next »