public static function getView($template, $ext = '.php') { if (!is_dir(TEMPLATE_PATH)) { fyMsg('当前使用的模板已被删除或损坏,请登录后台更换其他模板。', SITE_PATH . 'admin/themes.php'); } return TEMPLATE_PATH . $template . $ext; }
/** * 发送查询语句 * */ function query($sql) { $this->result = @mysql_query($sql, $this->conn); $this->queryCount++; if (!$this->result) { fyMsg("SQL语句执行错误:{$sql} <br />" . $this->geterror()); } else { return $this->result; } }
/** * 显示404错误页面 * */ function show_404_page() { if (is_file(TEMPLATE_PATH . '404.php')) { header("HTTP/1.1 404 Not Found"); include View::getView('404'); exit; } else { fyMsg('404', BLOG_URL); } }