Re: Re: Making includes easy.... Am I a 'tard?
| From: | Patrick Roane | Date: | Tue, 04 Jan 2005 23:26:08 +0000 |
| Subject: | Re: Re: Making includes easy.... Am I a 'tard? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25229@lists.php.net to get a copy of this message | ||
The inludes folder is thrown around as more of a
generic term for a directory that includes important
files. Is this a pretty good definition for the
purpose of an 'includes' folder?
Also, I've seen the following syntax before:
(__FILE__). Why the underscores?
thanks-
--- Jason Barnett <jason.barnett@telesuite.com> wrote:
> I haven't bothered to benchmark this, but here is my
> own solution to
> this problem. If you already have a common file
> that you are including
> in every script then the cost should be very low.
> Feel free to use it
> if you prefer.
>
> Apache
> htdocs
> site1
> includes
> common.php
> test_include.php
> testfolder
> test2.php
> site2
> includes
> (those four files)
> etc...
>
> <!-- common.php -->
> <?php
>
> $basedir = dirname(__FILE__) . '/';
>
> ?>
>
> <!-- test_include.php -->
> <?
>
> include_once common.php;
> /** Now you can include files relative to the base
> directory */
> include_once $basedir . 'testfolder/test2.php';
>
> ?>
>
>
> --
> Teach a person to fish...
>
> Ask smart questions:
> http://www.catb.org/~esr/faqs/smart-questions.html
> PHP Manual: http://php.net/manual/
> php-general archives:
> http://marc.theaimsgroup.com/?l=php-general&w=2
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You can do
this if you try. All that I want for you my son, is to be satisfied"
~ Lynard Skynard