Skip to content

Instantly share code, notes, and snippets.

@veb
Created August 22, 2014 09:56
Show Gist options
  • Save veb/5d62e8eb7365be49670e to your computer and use it in GitHub Desktop.
Save veb/5d62e8eb7365be49670e to your computer and use it in GitHub Desktop.
apache vhost php
<?php
$path = $_SERVER['SCRIPT_FILENAME'];
$path = explode('/', $path);
$path = "/{$path[1]}/{$path[2]}/{$path[3]}/{$path[4]}/{$path[5]}";
$_SERVER['DOCUMENT_ROOT'] = $path;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment