Skip to content

Instantly share code, notes, and snippets.

@komagata
Created June 2, 2015 07:21
Show Gist options
  • Save komagata/2b0c2a5c5be54faf461e to your computer and use it in GitHub Desktop.
Save komagata/2b0c2a5c5be54faf461e to your computer and use it in GitHub Desktop.
docroot hack for VirtualDocumentRoot
<?php
$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment