Re: include_once 'Config_File.class.php'
| From: | Cynic | Date: | Wed, 20 Jun 2001 20:03:04 +0000 |
| Subject: | Re: include_once 'Config_File.class.php' | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-902@lists.php.net to get a copy of this message | ||
Andrei,
do you remember which PHP versions / systems / combinations
of thereof you saw __FILE__ contain just the basename? This
should be track down and resolved, because it is a bug, or
at least a serious misfeature. (But I admit that the manual
is really confusing: "The name of the script file presently
being parsed." So is it full name incl. path or just the
basename?)
At 18:44 6/20/2001, Andrei Zmievski wrote the following:
--------------------------------------------------------------
>On Wed, 20 Jun 2001, Bernhard Fuerst wrote:
>> Hi,
>>
>> sorry if this was discussed earlier - I'm new to this list.
>>
>> In Smarty.class.php, line 181 (Version 1.4.2):
>>
>> Why not use
>>
>> include_once dirname(__FILE__) . '/Config_File.class.php';
>>
>> as used in line 43 to include Smarty.addons.php? So we are completely
>> independend from PHP's include_path.
>
>Because dirname(__FILE__) doesn't really work consistently across
>systems and PHP versions. Sometimes __FILE__ contains full path to the
>file, sometimes only the filename.
>
>-Andrei
>* "Lack of planning on your part doesn't constitute an emergency on my part." *
>
>---
>You are currently subscribed to smarty as: cynic@mail.cz
>To unsubscribe send a blank email to $subst('Email.Unsub')
>Visit Smarty's homepage at
>http://www.phpinsider.com/php/code/Smarty/
------end of quote------
cynic@mail.cz
-------------
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7