Re: file_exists
| From: | tedd | Date: | Fri, 16 Nov 2007 15:20:37 +0000 |
| Subject: | Re: file_exists | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264707@lists.php.net to get a copy of this message | ||
At 2:45 PM +0000 11/16/07, Stut wrote:
It also worth noting that what you're doing there is quite inefficient. I have a similar arrangement where I have a directory containing the include files, but I locate it in a different way. Most sites I deal with have an auto-prepended file containing (among other things) this line... ini_set('include_path', dirname(__FILE__).'/../code'.PATH_SEPARATOR.ini_get('include_path')); This adds the code subdirectory (relative to the location of the prepended file) to the include page. I then don't need to worry about where I am when I want to include a file. When a site goes into production I remove this line and set it in the virtualhost definition since there's no reason to re-calculate it on every request. -StutThanks, I think. Now I have to figure out what you did. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com