note 40677 added to function.realpath

From: Date: Thu, 11 Mar 2004 06:32:51 +0000
Subject: note 40677 added to function.realpath
Groups: php.notes 
Request: Send a blank email to php-notes+get-66606@lists.php.net to get a copy of this message
I found this with console scripts, where you run from an alias to a full path, the function realpath("./") seems to return the path to where your php script is sitting, and not where you are currently working from. (might be version dependant as this was occurring on debian using php 4.1.2 but not on redhat using php4.3.3 ) In order to get the directory base which you are currently in, I found this a good work around. $base = shell_exec( "pwd" ); ---- Manual Page -- http://www.php.net/manual/en/function.realpath.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40677 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40677&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40677&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66606) next »