小编Ham*_*lim的帖子

404找不到codeigniter网址

我是一个使用codeigniter的初学者.我使用以下URL" http://localhost/ci/index.php/shopcart "来访问控制器,我收到错误404页面未找到

控制器代码

     <?php

    class Cart extends CI_Controller { // Our Cart class extends the Controller class

        function Cart()
        {
            parent::CI_Controller(); // We define the the Controller class is the parent. 

        }


    }

        function index()
        {
            $this->load->model('cart_model'); // Load our cart model for our entire class 
            $data['products'] = $this->cart_model->retrieve_products(); // Retrieve an array with all products
            $data['content'] = 'cart/products'; // Select our view file that will display our products
            $this->load->view('index', $data); // Display the page with the above defined …
Run Code Online (Sandbox Code Playgroud)

php codeigniter http-status-code-404

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

codeigniter ×1

http-status-code-404 ×1

php ×1