Skip to content

Instantly share code, notes, and snippets.

@Itachi261092
Created October 12, 2015 13:00
Show Gist options
  • Save Itachi261092/968d644d423548c79a37 to your computer and use it in GitHub Desktop.
Save Itachi261092/968d644d423548c79a37 to your computer and use it in GitHub Desktop.
[PHP] Get absolute web-server path / Получаем абсолютный путь к веб-серверу
<?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