if(request()->param('verify_code')==''){
$this->error("请输入验证码!");
}
if(!captcha_check(request()->param('verify_code'))){
$this->error("验证码错误!");
}
}else{
return View::fetch('index');
}
请问为什么这么写总报错啊
Argument 1 passed to think\View::fetch() must be of the type string, array given, called in G:\Test\jxcn\vendor\topthink\fr
/**
* 解析和获取模板内容 用于输出
* @access public
* @param string $template 模板文件名或者内容
* @param array $vars 模板变量
* @return string
* @throws \Exception
*/
public function fetch(string $template = '', array $vars = []): string
{
return $this->getContent(function () use ($vars, $template) {
$this->engine()->fetch($template, array_merge($this->data, $vars));
});
}
/**
* 渲染内容输出
* @access public
最佳答案