Re: Include documentation updates
| From: | Niel Archer | Date: | Wed, 12 Aug 2009 01:44:55 +0000 |
| Subject: | Re: Include documentation updates | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969380760@lists.php.net to get a copy of this message | ||
>
> On Aug 11, 2009, at 8:35 PM, Niel Archer wrote:
>
> >> All,
> >>
> >> After reviewing the to-do items I saw that the include()
> >> documentation
> >> needed to be updated. I took a stab at simplifying the first few
> >> paragraphs which mostly involved removing verbose text and
> >> simplifying. Since the change is fairly significant I wanted to
> >> solicit feedback from the group instead of simply committing it.
> >>
> >> If I don't hear any suggestions I'll assume that it works and I'll
> >> commit it.
> >>
> > I think that this:
> >
> > - If filename begins with <literal>./</literal> or <literal>../</
> > literal>, it
> > - is looked for only in the current working directory or parent of
> > the
> > - current working directory, respectively.
> >
> > needs to be left in. Using either is important to stop the include
> > path
> > being searched and so speed up include failures. This user land
> > optimisation should be included (no pun intended) in the
> > documentation.
> >
> > --
> > Niel Archer
> > niel.archer (at) blueyonder.co.uk
> >
> >
>
> I'm assuming that when specifying the file path (including using ./
> and ../) that the include_path is ignored altogether. Is this a
> correct assumption?
I believe that assumption is correct. The include path is only used if
the filename is bare. i.e. no path is included at all.
> If so, I may add something along the lines of:
>
> "If the full path or a relative path to the file is defined, the
My personal preference would be:
If any path is defined (full or relative), the
> include_path will be ignored altogether. For example, if a filename
> begins with <literal>../</literal>, the parser will look in the parent
> directory to find the requested file."
> This documentation would go with the include_path documentation. A
> note to the effect of "to read more about how PHP handles finding
> included files..." would be included in the include() documentation
> (also no pun intended).
The rest looks good to me.
> Brandon
--
Niel Archer
niel.archer (at) blueyonder.co.uk