5.0.0 - 普通 - 未处理
tp5.1 最新版。在模型中定义了一个方法
model\user.php
namespace app\common\model;
public function getlist($code){
return User:where($code)->all()
}控制器中调用namespace app\index\controller;
use app\common\model\User;
public function lists($code){
$code = input('code');
$user = new User();
// 省略部分代码....
$list = $user->getlist($code);
}然后这样就报 Internal Server Error 500 错误了。模型user.php 中的方法不直接传参,就不会报错,如下就是正常的:
model\user.php
namespace app\common\model;
public function getlist(){
$code =input('code');
// ........
return User:where($code)->all()
}之前一直都是正常的。自从php中加入 Xdebug 调试之后就出问题,去掉Xdebug 扩展又正常了。这要怎么整?
