NYCPHP Meetup

NYPHP.org

[nycphp-talk] Include vs Include_once

Dan Cech dcech at phpwerx.net
Thu Nov 29 08:27:28 EST 2007


Urb LeJeune wrote:
>     My php.ini configuration is set to look for an include in the
> currently accessed directory and then in /usr/local/include. A
> contractor just delivered a program that works just fine if the
> include_once() files are in the same directory as the application
> but blows up if they files are not in the same directory but are
> in /usr/local/include.
> 
>     The only think I can see that is different is that he is using
> include_once() where I use include(). Also, one instance of
> include_once() is nested.
> 
>     Does any know if either the include_once() or a nested
> include_once affect how the php.ini include path is affected?

Urb,

1. It sounds like you may have a naming conflict, are any of the new
files include()ing files with names that already exist in
/usr/local/include?

Posting the exact content of your include_path setting may also help,
and I would check to make sure that it isn't being overridden in the
vhost, .htaccess or via ini_set.

2. Please don't start a new topic by replying to an existing thread and
changing the subject line, this breaks threading in most modern email
clients.

Dan



More information about the talk mailing list