进阶的问题?看看有神级的人物能破解的吗
在不更改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');
}
}
自己给自己结了 在core里面写就行了 这个可以先写一个类,继承 CI_Controller 然后在 config.php 里修改前缀,就可以了,不用修改源码。
在 CI 里基本没有需要修改源码才能实现的功能,至少目前我还没遇到。。。。
页:
[1]