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