added a new option - 'index_page'
added base_url_make() into codeigniter
This commit is contained in:
@ -63,6 +63,22 @@ if ( ! function_exists('base_url'))
|
||||
$CI =& get_instance();
|
||||
return $CI->config->slash_item('base_url');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( ! function_exists('base_url_make'))
|
||||
{
|
||||
function base_url_make($path)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$url = $CI->config->slash_item('base_url');
|
||||
if (substr($url, -1) == '/')
|
||||
{
|
||||
for ($i = 0; substr($path, $i, 1) == '/'; $i++);
|
||||
return $url . substr($path, $i);
|
||||
}
|
||||
else return $url . $path;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@ -590,4 +606,4 @@ if ( ! function_exists('_parse_attributes'))
|
||||
|
||||
|
||||
/* End of file url_helper.php */
|
||||
/* Location: ./system/helpers/url_helper.php */
|
||||
/* Location: ./system/helpers/url_helper.php */
|
||||
|
@ -386,4 +386,4 @@ class CI_Router {
|
||||
// END Router Class
|
||||
|
||||
/* End of file Router.php */
|
||||
/* Location: ./system/libraries/Router.php */
|
||||
/* Location: ./system/libraries/Router.php */
|
||||
|
Reference in New Issue
Block a user