How to find in which Directory is file on server

Some wired server have really strange patch to file how to find if you need write exactly path to some file without using short way with you domain

Create directory.php file upload on server in directory which you are looking to and run this file for example:

$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/file.html" . "</p>";


Leave a Reply

Your email address will not be published. Required fields are marked *