Is there any function to return a relative path from public_html to the file location?
<p>I need a function to return a relative path of the file , every where i run it.
for example this is my code in "loc.php" :</p>

<pre><code>&lt;?
echo whereiam();
?&gt;
</code></pre>

<p>outputs in these directories should be:</p>

<pre><code>public_html/loc.php : /
public_html/folder1/folder2/loc.php : ../../
</code></pre>

<p>Is there any built-in function in php for this use?</p>
