Re: Re: Include wierdness.
| From: | Jason Barnett | Date: | Fri, 04 Mar 2005 16:32:27 +0000 |
| Subject: | Re: Re: Include wierdness. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209996@lists.php.net to get a copy of this message | ||
Jochem Maas wrote:
> Rob Adams wrote:
...
>
> you 100% sure your include_path is '.' ? just asking.
> also you mention a /www/lib and a /www/include dir - maybe thats
> the problem?
>
> maybe you can make the problem go away by setting include_path to
> '.:/www/include' or '.:/www/lib'
This still sounds like the best place to start... check your
include_path and see if it includes '.' and/or whatever is the root
directory for your tikiwiki installation.
<?php var_dump(ini_get('include_path')); ?>
>
> I must say I think its overkill to use file_exists() on files
> you are going to require_once() - although no doubt there is a good
> reason to do it sometimes :-)
Well... I seem to recall there is an optional argument for require_once
that searches the include path. You can try using that parameter if you
don't know the current working directory (why?).
<?php require_once('some/relative/include.php', true); ?>
>
> it is odd though, file_exists() returns true yet the file cannot
> be included.
>
My guess is the file *is* in the include path, but the current working
directory when require_once() executes is not what the OP thinks it is...
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc