Re: Re: Really strange / TYPO
| From: | Deckard | Date: | Thu, 05 Oct 2006 21:29:19 +0000 |
| Subject: | Re: Re: Really strange / TYPO | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242730@lists.php.net to get a copy of this message | ||
Hi Richard,
Thank you so much for your answer.
dbInsert.php is in /var/www/html/classes while config.inc.php is in
/var/www/html
With your code, the file is always searched in /var/www/html/classes and
not in /var/www/html
Warm Regards,
Deckard
Richard Lynch wrote:
> On Thu, October 5, 2006 2:34 am, John Wells wrote:
>> [code]
>> // Consider *where* you create this
>> // Define it as a constant if you'd like...
>> define('BASE_PATH', dirname(__FILE__));
>>
>> // Now build the path, like (assuming it was created
>> // in a file located at /var/www/html
>> include_once(BASE_PATH . '/config.inc.php');
>> [/code]
>
> Gah!
>
> Now you've made it even HARDER to move the include files out of the
> web tree, or wherever is more convenient and safer.
>
> include_path is a much more powerful and flexible construct which will
> save you an inordinate amount of trouble if you just figure out how it
> works and use it...
>