示例#1
0
文件: layout.php 项目: pihizi/qf
 function load_css()
 {
     $output = '';
     foreach ((array) $this->css as $f) {
         if (is_array($f)) {
             $media = $f['media'];
             $f = $f['file'];
         } else {
             $media = NULL;
         }
         if (FALSE === strpos($f, '://')) {
             $url = CSS::cache_file($f);
         } else {
             $url = $f;
         }
         if ($media) {
             $output .= '<link href="' . H($url) . '" rel="stylesheet" type="text/css" media="' . $media . '"/>';
         } else {
             $output .= '<link href="' . H($url) . '" rel="stylesheet" type="text/css" />';
         }
     }
     return $output;
 }