note 64951 deleted from function.pathinfo by nlopess
| From: | nlopess@php.net | Date: | Tue, 25 Apr 2006 21:15:11 +0000 |
| Subject: | note 64951 deleted from function.pathinfo by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109698@lists.php.net to get a copy of this message | ||
Note Submitter: ludvig dot ericson at gmail dot com
----
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.