note 21652 modified in function.dirname by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 19:16:07 +0000 |
| Subject: | note 21652 modified in function.dirname by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142284@lists.php.net to get a copy of this message | ||
if you want to know the *File System* (not web) Absolute Path (expanding the links) of the script
that's currently being executed, try this:
<?php
$path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
?>
--was--
if you want to know the *File System* (not web) Absolute Path (expanding the links) of the script
that's currently being executed, try this:
$path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
http://php.net/manual/en/function.dirname.php