On 5/1/06, Nicolas Verhaeghe <[EMAIL PROTECTED]> wrote:
When I run the Zend debugger, it returns an error telling me it cannot
find
a certain include, while when I run the site it works fine.
My development machine is a WIMP (the server is a LAMP but it's not
relevant
here).
This is not the first include in this site, but the first include inside
of
an include:
require("includes/initiate.php");
I have tried pretty much everything:
require("initiate.php");
require("/includes/initiate.php");
require("./initiate.php");
And a few others more exotic.
The error I get is:
Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 -
main(includes/initiate.php): failed to open stream: No such file or
directory
Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 -
main(): Failed opening required 'includes/initiate.php'
(include_path='.;c:\php4\pear')
The include initiate.php calls a bunch of functions and classes.
Should I change the include_path to make Zend understand where to look?
And
why don't I get the error message with the previous includes?
I am testing Zend to determine if it is good environment (currently using
Dreamweaver, which is not that bad, but I heard that Zend is the
reference).
Thanks for the help!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try using a combination of dirname(__FILE__) and DIRECTORY_SEPARATOR to
get your paths.
You could say
require( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes'.
DIRECTORY_SEPARATOR .'initiate.php);
which would resolve the full path with the correct separator reguardless of
OS.