Absolute Path
A lot of times you need to know the Absolute Path of a certain file for PHP scripts and such. Users Online, Guestbooks and even Cutenews require the Absolute Path of a certain file or directory. Here's how to find it.
001. Put this code into a blank file and save it as
absolute.php or something. Just make sure the extension is
.php.
<?php
$absolutePath = realpath(dirname(__FILE__));
echo $absolutePath;
?>
002. Upload it and go to http://yourdomain.com/folder/absolute.php and something like this should appear:
/home/user/public_html/folder/ and that's it!
© Stainedink.com 2007 - 2008