, , , , , .
http://www.example.com/one/two/example-page.php
:
<a href='http://<?php echo htmlentities($_SERVER['SERVER_NAME'], ENT_QUOTES)?>/files/uploaded_file.jpg'>Your Uploaded File</a>
, , , .
http: //www.example.com/content/files/uploaded_file.jpg
, URL-.
<?php
$FilesystemPath = str_replace("\\", "/", realpath(dirname(__FILE__) . "/../../files/")) . "/uploaded_file.jpg";
$DocRoot = $_SERVER['DOCUMENT_ROOT'];
$Uri = str_replace($DocRoot, '', $FilesystemPath);
?>
<a href='http://<?php echo htmlentities($_SERVER['SERVER_NAME'] . $Uri, ENT_QUOTES)?>'>Your Uploaded File</a>
, , , .
, URL-. , http, https. , , , .