Posted By

elvman on 11/09/11


Tagged


Versions (?)

Base URL


 / Published in: PHP
 

  1. define('BASE_URL', 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '')
  2. .'://'.$_SERVER['HTTP_HOST'].str_replace('//','/',dirname($_SERVER['SCRIPT_NAME']).'/'));

Report this snippet  

You need to login to post a comment.