示例#1
0
 public static function http($code, $location = null)
 {
     self::setStatus($code);
     if ($location !== null) {
         header('Location: ' . $location, true, $code);
     }
     if (!magic::get('css')) {
         self::css('body{background:#fff;color:#000;font-family:sans-serif;font-size: 12px;}');
         self::css('a{color:#00c}');
         self::css('a:visited{color:#551a8b}');
         self::css('a:hover{color:#f00}');
     }
     magic::call($code, array('response', 'magic'), $location);
     exit;
 }
示例#2
0
文件: head.php 项目: ExceptVL/kanon
<?php

echo '<!DOCTYPE html>';
echo '<title>' . magic::get('title', 'Untitled page') . '</title>';
$css = magic::get('css', '');
if ($css != '') {
    echo '<style type="text/css">';
    echo $css;
    echo '</style>';
}