ThinkPHP5.1 @[模块/控制器/]操作

来源:互联网 发布:linux运维基础知识 编辑:程序博客网 时间:2024/06/05 10:01
/home/myth/www/think/application/index/controller/Blog.php
<?php

namespace app\index\controller;
use think\Controller;

class Blog extends Controller
{
    public function read($id){
        return 'read - '.$id;
    }
}

/home/myth/www/think/route/route.php
Route::get('blog/:id','@index/blog/read');  // http://contoso.org/blog/2233
原创粉丝点击