Skip to content

Instantly share code, notes, and snippets.

@joeworkman
Created May 4, 2013 16:20
Show Gist options
  • Select an option

  • Save joeworkman/5517978 to your computer and use it in GitHub Desktop.

Select an option

Save joeworkman/5517978 to your computer and use it in GitHub Desktop.
GoDaddy has some `interesting` server setups. When developing PHP to be used across many hosts, DOCUMENT_ROOT is commonly used. Sadly GoDaddy makes things difficult. Here is the fix.
<?php
if (!empty($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
#GoDaddy Hackery
$_SERVER['DOCUMENT_ROOT'] = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
}
?>
@yamenshahin

Copy link
Copy Markdown

Thank you. You helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment