PHP: URL path to file in same directory

<?php
$urlPathToFileInSameDirectory = (isset($_SERVER['HTTPS'])) ? "https" : "http" . str_replace('/index.php',"",str_replace(basename(__FILE__),"","://$_SERVER[HTTP_HOST]$_SERVER[PHP_SELF]")).'/MyFileName.txt';
?>

 


Beitrag veröffentlicht

in

,

von