0

私はcodeIgniterとLinuxも初めてです。実行しようとすると、 がhttp://localhost/CodeIgniter/hello/first_page表示されます404 Error: Page not found。私のコントローラークラス:

/*hello.php*/
class Hello extends CI_Controller
{
    function __construct() {
        parent::__construct();
    }
    function first_page()
    {
        $this->load->view('first_view');
    }
}

そして私first_view.phpは:

<html>
    <head>
        <title>First CI Page</title>
    </head>
    <body>
        Hi Folks !
    </body>

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */   

?>
</html>

注意:http://localhost/CodeIgniterウェルカム メッセージが表示されます。また、すべてのファイルが実行可能です (777)

4

1 に答える 1

3

このURLを試してみてください..あなたはそれを得るでしょう

http://localhost/CodeIgniter/index.php/hello/first_page

含める必要がありますindex.php

于 2012-12-28T11:39:55.723 に答える