|
Posted by David T. Ashley on 06/07/07 15:44
"Ivαn Sαnchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:f4979g$8j9$1@hercules.cohp1...
> David T. Ashley wrote:
>
>> Does require_once() treat "file.inc" and "subdirectory/file.inc" as the
>> same things or different?
>
> Different, of course.
>
>> The reason for my question is that I'd like to organize my PHP library
>> into subdirectories, and if I accidentally have a naming collision, I'm
>> curious how require_once() will behave.
>
> As usual: It will look for the specified filename in the current working
> directory, then in the directories specified in the "Include dirs"
> configuration directive.
>
> Please RTFM for specifics.
Thanks for your reply.
My question was subtly different.
I have no doubt that require_once() will open and include the correct file.
I was concerned about it possibly believing that "/dir1/file.inc" had been
included when it was "/dir2/file.inc". In other words, I was concerned
about the "once" part of it and how it remembers what has already been
included.
My question was about the "once" part of it.
Thanks, Dave.
Navigation:
[Reply to this message]
|