|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Index extends CI_Controller {
function __construct()
{
parent::__construct();
}
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
$data['aaq']="另一个";
$data['title'] = "My Real Title";
$data['heading'] = "My Real Heading";
$data['welcome']="欢迎使用ci框架";
$this->load->view('welcome_message', $data);
}
public function blog()
{
echo '这是测试';
}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
用http://127.0.0.1/ci/index.php 可以访问 正常
用http://127.0.0.1/ci/index.php/blog 出错404 Page Not Found The page you requested was not found.
请高人 帮我解决下 谢谢 |
|