首页 > 其他 > 详细

自动定位控制器

时间:2020-05-08 10:13:39      阅读:55      评论:0      收藏:0      [点我收藏+]
namespace app\index\controller\one;

use think\Controller;

class Blog extends Controller
{
    public function index()
    {
        return $this->fetch();
    }
    
    public function add()
    {
        return $this->fetch();
    }
    
    public function edit($id)
    {
        return $this->fetch(‘edit:‘.$id);
    }
}

我们就可以直接访问下面的URL地址了:

http://serverName/index.php/index/one/Blog

自动定位控制器

原文:https://www.cnblogs.com/mmore123/p/12848350.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!