-
-
Save valguss/2049474 to your computer and use it in GitHub Desktop.
Thoughts on best way to test subdomain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//faster using strpos | |
$staging_subdomains = array( | |
's1', | |
's2', | |
's3', | |
's4', | |
's5', | |
'mac', | |
'local', | |
'mac-upgrade', | |
); | |
foreach($staging_subdomains as $needle){ | |
if(strpos($_SERVER['HTTP_HOST'], $needle) !== false){ | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_errors', 1); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Benchmark http://codepad.viper-7.com/309irC