예제 #1
0
 /**
  * 文章页静态文件生成并返回生成文件名的数组
  * 
  * @param array $ids
  * @return string
  */
 private function articlehtml($ids = [], $type = 'pc')
 {
     $template = new PrintController('online', $type);
     $result = array();
     if ($type == 'pc') {
         $publicdata = $this->pushpc;
     } else {
         $publicdata = $this->pushmobile;
     }
     foreach ((array) $ids as $id) {
         if (isset($articles)) {
             unset($articles);
         }
         $articles = Articles::where($type . '_show', '1')->where('c_id', $id)->where('use_url', '0')->lists('id');
         $paths = array();
         if (count($articles)) {
             $paths = @$template->articlepush($id, $publicdata, $this->last_html_precent, $this->html_precent);
             $this->last_html_precent += $this->html_precent * count($paths);
             $result = array_merge((array) $result, (array) $paths);
         }
     }
     return $result;
 }