将html页面添加到codeigniter项目

I crated a simple html page mypage.html. It simply post data to upload.php all this run fine.

But now I wanted to add this page in my codeigniter project. But it could not added. How I can add this page to my codeigniter project. such that I only type mypage.html in url.

this is error

404 Page Not Found

The page you requested was not found.

You need to create a controller, and then load the .html template from that controller.

Example:

Create a controller called 'Page.php'. Create a function within this controller called mypage(). Within mypage(), simply load your template:

<?php

class Page extends CI_Controller {

    public function mypage()
    {
        $this->load->view('mypage.html');
    }
}

Ensure your .html template is in the 'Views' folder. Then simply access via the browser by entering localhost/page/mypage

Codeigniter provide great docs and tutorials. Check them out here http://ellislab.com/codeigniter/user-guide/tutorial/static_pages.html

You can make method in you controler. There you load that page like $this->load->view("youpagename"), but before this, change your file from .html to .php