Home - Help & Support - Contact Us
    

How to find absolute path of file from root on a linux web server?

 The easiest way to find absolute path of file from root on a linux web-server is to use php.

 

  1. Create a file in the directory that you want to find the absolute path, name it apath.php
  2. Put the following code in that file.

<?php

echo 'The absolute path to this directory is <br><b>'.realpath(".").'</b>';

?>

  1. Direct your browser to the file. The absolute path should appear!

If you are too lazy to create the file, download the attachement of this question, place it in the directory you need absolute path for and run it from your browser.


Attachments & Downloads


Would you like to...



Print this page Print this page Email this page Email this page Post a comment Post a comment Subscribe me (Subscribe to receive notification when this article is updated.) Add to favorites Add to favorites Remove Highlighting Remove Highlighting Edit this Article

User Opinions (8 votes)

100% thumbs up 0% thumbs down

How would you rate this answer?




Thank you for rating this answer.


Related Articles



Visitor Comments

No visitor comments posted. Post a comment

Post a comment, a question or any related helpful information

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name or Website::
   Email:
* Comment:
* Enter the code below: