Skip to content

Instantly share code, notes, and snippets.

@WebiSamurai
Created July 25, 2017 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WebiSamurai/c8e6c8f27b154742237602bc65347aea to your computer and use it in GitHub Desktop.
Save WebiSamurai/c8e6c8f27b154742237602bc65347aea to your computer and use it in GitHub Desktop.
Absolute path to a folder or a file of a site on a hosting
<?php
echo 'Document root: '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo 'Полный путь к скрипту и его имя: '.$_SERVER['SCRIPT_FILENAME'].'<br>';
echo 'Имя скрипта: '.$_SERVER['SCRIPT_NAME'];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment