Archive for May, 2015

Find Absolute Path of Your File

Tuesday, May 12th, 2015


I was setting .htaccess file for one of my projects and I noticed I needed to know the absolute path of my file. 
Here is what I found really handy and I would like to share it with you.

All you need to do is opening an editor and copy and paste the bellow code in it. Save you file as "pathfinder.php" and 
upload this file to your folder. Now all you need is a double click on "pathfinder.php".


$dir = dirname(__FILE__);
echo "<p> Full path to your directory is" . $dir ."</p>";