Re: include question
| From: | Daniel Brown | Date: | Fri, 06 Mar 2009 13:56:55 +0000 |
| Subject: | Re: include question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289457@lists.php.net to get a copy of this message | ||
On Fri, Mar 6, 2009 at 08:53, Stuart <stuttle@gmail.com> wrote:
>>
>> 1.) We use regular open tags to be compatible with all stock
>> PHP configurations.
>> 2.) We echo out the response from dirname() so that it's
>> output to the HTML source.
>> 3.) We use dirname() twice, so it gives the dirname() of the
>> dirname(), rather than '..'.
>> 4.) There are double underscores around FILE. The same is
>> true with LINE, FUNCTION, etc.
>
> 5.) dirname() gives you the full path on disk, not the URL. Usually you can
> just remove the document root path to get the URL. This could be in
> $_SERVER['DOCUMENT_ROOT'] but you can't rely on that between servers or when
> the config changes.
6.) When used in conjunction with realpath()[1], it will
resolve the absolute local pathname.
^1: http://php.net/realpath
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000