note 64951 added to function.pathinfo
| From: | ludvigdotericsonatgmaildotcom at osu1 dot php dot net | Date: | Sun, 23 Apr 2006 15:57:22 +0000 |
| Subject: | note 64951 added to function.pathinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-109167@lists.php.net to get a copy of this message | ||
To: 19-Apr-2006 09:17, imran
<?php
function getCurrentPath()
{
return dirname('http://' . $_SERVER['HTTP_HOST']
. $_SERVER['PHP_SELF']);
}
?>
Shorter, and doesn't assign a variable that gets deleted on the line beneath :P
Also fixed indent to 4 spaces instead of 3.
----
Server IP: 129.16.214.50
Probable Submitter: 213.89.141.235
----
X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
TO_HAS_SPACES,TO_MALFORMED autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.pathinfo.php
Edit -- http://master.php.net/note/edit/64951
Del: integrated -- http://master.php.net/note/delete/64951/integrated
Del: useless -- http://master.php.net/note/delete/64951/useless
Del: bad code -- http://master.php.net/note/delete/64951/bad+code
Del: spam -- http://master.php.net/note/delete/64951/spam
Del: non-english -- http://master.php.net/note/delete/64951/non-english
Del: in docs -- http://master.php.net/note/delete/64951/in+docs
Del: other reasons-- http://master.php.net/note/delete/64951
Reject -- http://master.php.net/note/reject/64951
Search -- http://master.php.net/manage/user-notes.php