Created
January 29, 2018 13:42
-
-
Save ErlendEllingsen/f5c1566794fe0d5121c1bc395341f044 to your computer and use it in GitHub Desktop.
PHP Auto script web url
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 | |
//Create web link | |
$linkPrefix = (APP_ENVIRONMENT == APP_ENVIRONMENT_PROD ? 'https://' : 'http://'); | |
define('APP_WWW_PATH', $linkPrefix . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment