예제 #1
0
 /**
  * 首页生成静态文件并返回生成文件名
  * 
  * @return string
  */
 private function homgepagehtml()
 {
     $this->getPrecent();
     ob_start();
     $path = public_path('customers/' . $this->customer . '/index.html');
     $template = new PrintController('online', 'pc');
     echo $template->homepagePreview();
     file_put_contents($path, ob_get_contents());
     //ob_clean();
     ob_end_clean();
     return $path;
 }
예제 #2
0
 /**
  * 首页生成静态文件并返回生成文件名
  * 
  * @return string
  */
 private function homgepagehtml($type = 'pc')
 {
     $this->getPrecent();
     ob_start();
     $path = $type == 'pc' ? public_path('customers/' . $this->customer . '/index.html') : public_path('customers/' . $this->customer . '/mobile/index.html');
     $template = new PrintController('online', $type);
     if ($type == 'pc') {
         echo $template->homepagePreview();
     } else {
         echo $template->mhomepagePreview();
     }
     file_put_contents($path, ob_get_contents());
     ob_end_clean();
     return $path;
 }
예제 #3
0
 /**
  * PC首页预览
  */
 public function homepagePreview()
 {
     $template = new PrintController();
     return $template->homepagePreview();
 }