Seattle Web Design Seattle Web Design

Find Absolute Path of Your File

 

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".

 

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

 

 

 





Leave a Reply

 
Kianoush Facebook Profile Kianoush Google Plus Profile Kianoush LinkedIn Profile Find Kianoush Twitter