note 92391 added to function.getcwd
| From: | mal_isko_leather at nounderscores dot gmail dot com | Date: | Wed, 22 Jul 2009 20:52:30 +0000 |
| Subject: | note 92391 added to function.getcwd | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158590@lists.php.net to get a copy of this message | ||
@Wolfgang
$cwd = dirname($_SERVER['SCRIPT_FILENAME']);
instead of
$cwd = exec('pwd');
is a more universal approach, than relying on executing system functions (which could be a problem
if your shell has limited functionality )
----
Server IP: 209.41.74.194
Probable Submitter: 69.64.10.50
----
Manual Page -- http://www.php.net/manual/en/function.getcwd.php
Edit -- https://master.php.net/note/edit/92391
Del: integrated -- https://master.php.net/note/delete/92391/integrated
Del: useless -- https://master.php.net/note/delete/92391/useless
Del: bad code -- https://master.php.net/note/delete/92391/bad+code
Del: spam -- https://master.php.net/note/delete/92391/spam
Del: non-english -- https://master.php.net/note/delete/92391/non-english
Del: in docs -- https://master.php.net/note/delete/92391/in+docs
Del: other reasons-- https://master.php.net/note/delete/92391
Reject -- https://master.php.net/note/reject/92391
Search -- https://master.php.net/manage/user-notes.php