namespace app\luntan\controller;
use think\View;
use think\Controller;
use think\Db;
use app\luntan\model\Essay as EssayModel;
use app\luntan\controller\Index;
class Read extends Controller{
public function read(){
$index=new Index();
$index->index();
$result=$this->read_essay();
dump($result);
$this->assign('ti
$this->assign('result',$result);
return $this->fetch();
}
public function read_essay(){
if(request()->isGet()){
$essayti
$essay=new EssayModel();
$result=$essay->read_essay($essayti
if($result){
return $result;
}else{
$this->error('未知错误');
}
}else{
$this-error('未知错误');
}
}
}
数据能够dump出来,但是使用assgin一直显示result未定义
最佳答案