ThinkPHP5.1 @[模块/控制器/]操作
/home/myth/www/think/application/index/controller/Blog.php
<?php
namespace appindexcontroller;
use thinkController;
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
<?php
namespace appindexcontroller;
use thinkController;
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
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
- 上一篇: tp取无限级分类
- 下一篇: ThinkPHP之跨控制器调用