【发布时间】:2016-06-04 12:21:23
【问题描述】:
我是 Codeignator 的新手。当我浏览它时,它会向我显示“404 页面未找到”之类的错误。下面是代码
控制器代码: 插入.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Insertion extends CI_Controller {
public function Insert()
{
$this->load->view('Insert_view');
}
}
?>
查看代码:Insert_view.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Welcome to CodeIgniter</title>
</head>
<body>
<div id="container">
<h1>Hello world!</h1>
</div>
</body>
</html>
【问题讨论】:
-
将控制器文件名设为
Insertion.php而不是Insert.php -
输入了什么网址?
标签: php html codeigniter