Welcome Guest, Not a member yet? Register   Sign In
[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



Theme © iAndrew 2016 - Forum software by © MyBB