I wrote :
I have problems with relative paths and 4.3.0. Include() do not seem to
work the same way in 4.3.0 and 4.2.1.
This is mostly due to a characteristic of Solaris and a minor change in
the way PHP handles includes (I guess):
1) Before parsing a script, PHP sets the directory of this
Goetz Lohmann wrote :
doc_root = /usr/local/www/htdocs
than maybe leave this blank !
No. In my case it's absolutely senseless to define doc_root in php.ini
since there are many virtual servers in httpd.conf, each with its own root.
It's also the reason why I don't want Apache to get a
Jean-Pierre Gallou schrieb:
Hi,
I have problems with relative paths and 4.3.0. Include() do not seem to
work the same way in 4.3.0 and 4.2.1. Consider this test:
test/
|- testinclude.php ? include ('inc/inc1.php'); ?
|- inc/
|- inc1.php ? include ('inc/inc2.php'); ?
Thank you for your reply. Goetz Lohmann wrote :
Failed opening '/inc/inc2.php'
Yes, I don't understand the reason of the leading slash in the error
message.
... maybe try something like
include('./inc/inc1.php');
^^
same thing: Failed opening './inc/inc2.php' for inclusion
--
Jean-Pierre Gallou schrieb:
Thank you for your reply. Goetz Lohmann wrote :
Failed opening '/inc/inc2.php'
Yes, I don't understand the reason of the leading slash in the error
message.
... maybe try something like
include('./inc/inc1.php');
^^
same thing: Failed
Goetz Lohmann wrote :
wich means that testinclude.php includes inc/inc1.php
and inc/inc1.php includes inc/inc2.php ?
Right. I'm sorry, I didn't modify testinclude.php as you suggested, but
inc1.php. With a modified testinclude.php:
? include ('./inc/inc1.php'); ?
I get:
Failed opening
Jean-Pierre Gallou schrieb:
Goetz Lohmann wrote :
wich means that testinclude.php includes inc/inc1.php
and inc/inc1.php includes inc/inc2.php ?
Right. I'm sorry, I didn't modify testinclude.php as you suggested, but
inc1.php. With a modified testinclude.php:
? include
7 matches
Mail list logo