• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Getting parent url codeigniter

#2
[eluser]riwakawd[/eluser]
After thinking about it for a while I had to do this working great now.

Code:
if (isset($_SERVER['HTTP_HOST'])) {

$catalog_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http';    
$catalog_url .= '://'. $_SERVER['HTTP_HOST'] . rtrim(rtrim(dirname($_SERVER['SCRIPT_NAME']), 'admin'), '/.\\'). '/';

} else {

// Back Up Url
$base_url = 'http://localhost/';

}

define('CATALOG_URL', $catalog_url);

unset($catalog_url);


Messages In This Thread
[SOLVED] Getting parent url codeigniter - by El Forum - 07-17-2014, 11:54 PM
[SOLVED] Getting parent url codeigniter - by El Forum - 07-18-2014, 02:36 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.