Ejemplo n.º 1
0
 /**
  * 公共头标题关键字
  */
 public static function setTitle($paramArr)
 {
     $options = array('title' => '', 'description' => '', 'keywords' => '', 'css' => '');
     if (is_array($paramArr)) {
         $options = array_merge($options, $paramArr);
     }
     extract($options);
     $outStr = "<!DOCTYPE html>\n";
     $outStr .= '<html lang="zh-CN">' . "\n";
     $outStr .= "<head>\n";
     $outStr .= '<meta charset="gbk">' . "\n";
     $outStr .= '<meta name="renderer" content="webkit">' . "\n";
     #为360浏览器置顶内核设置为chrome
     if ($title) {
         $outStr .= '<title>' . $title . '</title>' . "\n";
     }
     if ($description) {
         $outStr .= '<meta name="description" content="' . $description . '">' . "\n";
     }
     if ($keywords) {
         $outStr .= '<meta name="keywords" content="' . $keywords . '">' . "\n";
     }
     if ($css) {
         $outStr .= Libs_Global_PageHtml::getMergeFrontendLink($css, "css");
     }
     $outStr .= "</head><body>";
     return $outStr;
 }