豆芽彻底疯了 发表于 2014-11-5 10:50:35

进阶的问题?看看有神级的人物能破解的吗

在不更改system系统为前提下

怎么能让 Welcome 集成自定义前缀 Os达到 class Welcome extends Os_Controller

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends Os_Controller {

    /**
   * 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()
    {
      $this->load->view('welcome_message');
    }
}

豆芽彻底疯了 发表于 2014-11-5 11:01:26

自己给自己结了 在core里面写就行了

Hex 发表于 2014-11-5 12:24:23

这个可以先写一个类,继承 CI_Controller 然后在 config.php 里修改前缀,就可以了,不用修改源码。

在 CI 里基本没有需要修改源码才能实现的功能,至少目前我还没遇到。。。。
页: [1]
查看完整版本: 进阶的问题?看看有神级的人物能破解的吗