Return to Snippet

Revision: 32469
at September 25, 2010 21:58 by traeregan


Initial Code
// Auto-Determine Subdirectory of Install Path, If Any
// If Not Present, Will Result in /
	
	$slash = explode('/', getenv("SCRIPT_NAME"));
	$current_filename = $slash[count($slash) - 1];
	$host_url = str_replace($current_filename, "", getenv("SCRIPT_NAME"));

// e.g. usage	

	$config['base_url'] = "http://". $_SERVER['HTTP_HOST'].$host_url;

Initial URL

                                

Initial Description

                                

Initial Title
Auto-Determine Subdirectory of Install Path, If Any

Initial Tags
php, codeigniter

Initial Language
PHP