Re: Include problems
| From: | Bojan Tesanovic | Date: | Sun, 13 Apr 2008 03:06:52 +0000 |
| Subject: | Re: Include problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272950@lists.php.net to get a copy of this message | ||
On Apr 12, 2008, at 8:28 AM, GoWtHaM NaRiSiPaLli wrote:
if(file_exists("../common/config.ini")) { $configData = parse_ini_file("../common/config.ini"); } else {Try changing above code so it reads if(file_exists("common/config.ini")) { $configData = parse_ini_file("common/config.ini"); } else { As the xyz.php is in /var/www/sites/project/ folder , and that is the starting path of the script so any script that needs to include /var/www/sites/project/common/someFile.php you need to specify relative path to '/var/www/sites/project/' which is 'common/someFile.php' this should work unless some of included files uses 'chdir' function that changes current directory Igor Jocic http://www.carster.us/ Used Car Classifieds