note 25991 rejected from function.chdir by betz

From: Date: Tue, 15 Oct 2002 09:03:27 +0000
Subject: note 25991 rejected from function.chdir by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38093@lists.php.net to get a copy of this message
(As a newbie, I'm offering this as a comment and as a question...) The string for the directory can apparently be written as an absolute path like "c:/data/folder1/folder2/" (with optional last slash?) OR as a relative path like "folder-brother/" or ".." or "../folder-cousin/" As far as I've seen, relative means not necessarily relative to where my script is located, but to where my script has brought me - for example if I'm in the middle of parsing through a directory tree and have used opendir() & readdir() etc. Something that's surprised me is that chdir("c:/thisdir") works but if I say $dir = "c:/thisdir" then chdir($dir) does NOT work. Why? Does it have to do with globals variables? chdir($GLOBALS["dir"]) doesn't work either. Ideas, comments, answers? thanks!

« previous php.notes (#38093) next »