Skip to content

Instantly share code, notes, and snippets.

@dotku
Last active November 15, 2016 09:12
Show Gist options
  • Select an option

  • Save dotku/53bb5e215fa7293a1c2bced8d6bbb3fb to your computer and use it in GitHub Desktop.

Select an option

Save dotku/53bb5e215fa7293a1c2bced8d6bbb3fb to your computer and use it in GitHub Desktop.

1. Public 目录

ThinkPHP5 借鉴了 Lavarel 的 Public 目录方式来存放"前端"的文件,这里的前端还包括了 PHP 路由,所以是不完全前端文件夹。总的意思是前后端比较明确的分离。

2. Controller 更加清爽了

#TP5
<?php
namespace app\index\controller;

class Index
{
    public function index()
    {
      return 'hello tp5!';
    }
}
#TP3
<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller {
...
}

3. 报错更加霸道了...

BUG_REPORT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment