|

- 积分
- 667
- 威望
- 68
- CI版本
- 1.7.2
 
|
base_url()在哪里啊?
arbou 发表于 2009-7-4 09:18 
比方说,你在config.php里面是这样设置的:
$config['base_url'] = "http://localhost/bookstore/";
$config['index_page'] = "index.php";
那么你调用base_url()函数返回值是http://localhost/bookstore/,而调用site_url()函数则会返回http://localhost/bookstore/index.php 。因为我是用URL Rewite方式去掉了URL中的index.php,如果你要保留这个的话,就必须把所有页面中的base_url()替换为site_url(),要不然链接都会出错。 |
|