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?

If so, I may add something along the lines of:

"If the full path or a relative path to the file is defined, 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).

Brandon

Reply via email to