traq
08-30-2009, 09:18 AM
Hi,
I need to figure out how to determine the absolute path to the directory containing the currently executing script:
<?php
$absolute = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
?>
will get me the path including the file name, but I want it without. Like so:
www.example.com/path/to/
and not like so:
www.example.com/path/to/file.php
If you have the answer, I'd love to hear it :)
I need to figure out how to determine the absolute path to the directory containing the currently executing script:
<?php
$absolute = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
?>
will get me the path including the file name, but I want it without. Like so:
www.example.com/path/to/
and not like so:
www.example.com/path/to/file.php
If you have the answer, I'd love to hear it :)