Include oddity

From: Date: Sat, 23 Sep 2000 07:42:21 +0000
Subject: Include oddity
Groups: php.dev 
Request: Send a blank email to php-dev+get-33612@lists.php.net to get a copy of this message
When using relative paths in a require() call, it's taking the base directory to be the "execution directory" and not the directory that the file is in. Is this expected/as designed? Should we just always use absolute paths? base dir1 dir2 dir3 in dir1/myclass.php4 require("../dir3/someinclude.h"); from dir2, run "php ../dir1/myclass.php4 and the require() is trying to now get ../dir1/someinclude.h from -dir2- instead of taking the base as of where myclass.php4 is actually located and doing the require() call from. I can't find any reference to this is the docs. Is this "as designed?" -Szii "absolute paths are your friends"

« previous php.dev (#33612) next »