note 92391 deleted from function.getcwd by danbrown
| From: | danbrown@php.net | Date: | Wed, 22 Jul 2009 20:53:29 +0000 |
| Subject: | note 92391 deleted from function.getcwd by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158591@lists.php.net to get a copy of this message | ||
Note Submitter: mal_isko_leather at nounderscores dot gmail dot com
----
@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 )