added a new option - 'index_page'

added base_url_make() into codeigniter
This commit is contained in:
2010-08-03 05:55:12 +00:00
parent 7b08188e6a
commit 93a0375011
39 changed files with 202 additions and 125 deletions

View File

@ -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 */

View File

@ -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 */