Skip to content

Instantly share code, notes, and snippets.

@AndreiTelteu
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreiTelteu/c233766e914f6534e959 to your computer and use it in GitHub Desktop.
Save AndreiTelteu/c233766e914f6534e959 to your computer and use it in GitHub Desktop.
<?php
$baseUrl = $_SERVER['REQUEST_SCHEME']."://".$_SERVER['SERVER_NAME'];
if ($_SERVER['SERVER_PORT'] != '80') $baseUrl .= ":".$_SERVER['SERVER_PORT'];
define("BASE_URL", $baseUrl);
<?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment