纯天然小白求帮助 bese_url() 报错?
本帖最后由 andyzu 于 2017-11-20 14:36 编辑class C_login extends CI_Controller
{
//官方给的写法,构造函数
public function __construct()
{
parent::__construct();
$this->load->helper('url');
}
public function index()
{
echo bese_url();
}
}
运行后,提示:
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function bese_url()
Filename: /Applications/XAMPP/xamppfiles/htdocs/company/application/controllers/C_login.php
Line Number: 29
Backtrace:
File: /Applications/XAMPP/xamppfiles/htdocs/company/index.php
Line: 315
Function: require_once 是 base_url 不是 bese_url,拼写不过关…… 额,是我手误,对不起!
但是改成 base_url(),打印出来的是http://[::1]/company/ ,应该不对吧
应该是 http://localhost/company
好了,搞定了,刚仔细看了下手册,修改了 config.php 文件
谢谢~
页:
[1]