Re: ../ not working in path

From: Date: Thu, 08 May 2003 17:04:55 +0000
Subject: Re: ../ not working in path
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146882@lists.php.net to get a copy of this message
The way you display the directories is not clear, if you have the path as webserver/documents/PHP_scripts/test_script/Text_folder/week_folder, then you should be using a relative path of $targetFolder = "Text_folder/week_folder"; If all else fails just use full absolute paths, ie. $targetFolder = "/webserver/documents/PHP_scripts/test_script/Text_folder/week_folder"; "Ken Tozier" <kentozier@attbi.com> wrote in message news:44E1AE6D-8174-11D7-91CE-003065F300E2@attbi.com... > In the following hierarchy, test_script can't see week_folder > > webserver > documents > PHP_scripts > test_script > Text_folder > week_folder > > I've tried the following path references inside test_script but the ../ > doesn't seem to be expanding > > <?PHP > > // All of these fail... > $targetFolder = "../Text_folder/week_folder"; > $targetFolder = '../Text_folder/week_folder'; > $targetFolder = "../../Text_folder/week_folder"; > $targetFolder = '../../Text_folder/week_folder'; > > chdir($targetFolder); > > ?> > > ... with the following error message > Warning: chdir() [function.chdir]: No such file or directory (errno 2) > > // The permissions on all folders are set to 0777 so I can't figure out > why test_script can't see week_folder > > When test_script is moved up a level it works fine: > webserver > documents > test_script > Text_folder > week_folder > > What am I doing wrong? > > Thanks, > > Ken >

« previous php.general (#146882) next »