thinkphp5 返回数组提示variable type error: array

浏览:42253 发布日期:2016/09/27 分类:ThinkPHP5专区 关键字: thinkphp
index.php【控制器】下有方法
public function test(){
$result=array('test'=>'123');
return $result;
}

我大概就这样返回,直接用网页访问test方法(demo.com/test.html) 报php错误。variable type error: array
这个是否也太暴力了?

最佳答案
评论( 相关
后面还有条评论,点击查看>>