我执行这个函数
public function index()
{
$add='add';
return ($this->success('dsfafdadfs',$add));
}
结果就报这个错误,没道理呀?我也看了详细看了success这个函数原型,可以带5个变量,总说变量类型错误,什么原因呀,郁闷中.............
[0] InvalidArgumentException in Response.php line 312
variable type error: array
* 获取输出数据
* @return mixed
*/
public function getContent()
{
if (null == $this->content) {
$content = $this->output($this->data);
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([$content,'__toString',])) {
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
}
$this->content = (string) $content;
}
return $this->content;
}
/**
* 获取状态码
Call Stack
in Response.php line 312
at Response->getContent() in Response.php line 94
at Response->send() in start.php line 19
at require('D:1phpwwwroottest...') in index.php line 17### 问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)