Is there a PHP function that does the opposite of real_path?
<p>In an upload script, I have</p>

<pre><code>$destination = $_SERVER['DOCUMENT_ROOT'] . '/uploads/'. $_SESSION['username'] . '/entries/' . '/' . $year . '/';
</code></pre>

<p>and i upload the image path to the database, and thus the string stores is the real_path(ie. S:\sites\www\mysite\uploads\username\entries\2011\file.png)</p>

<p>is there a function that converts that real path into "http://sitename/uploads..."</p>

<p>althought not hard to implement, i was wondering if there is a built-in one. i looked in the docs but couldn't find anything.</p>
