/** * 生成搜索页面 */ public function sendData($type = 'pc') { $template = new PrintController('online', $type); if ($type == 'pc') { $publicdata = $this->pushpc; } else { $publicdata = $this->pushmobile; } ob_start(); $path = $type == 'pc' ? public_path('customers/' . $this->customer . '/search.html') : public_path('customers/' . $this->customer . '/mobile/search.html'); echo $template->searchPush($publicdata); file_put_contents($path, ob_get_contents()); ob_end_clean(); return $path; }