本文整理汇总了PHP中app::output方法的典型用法代码示例。如果您正苦于以下问题:PHP app::output方法的具体用法?PHP app::output怎么用?PHP app::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::output方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch_resource
protected function fetch_resource($type_folder)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
$param = app::$param;
$tmpl_dir = "";
if (count($param) > 1) {
$tmpl_dir = $param[0] . "/";
$param = array_slice($param, 1);
$filename = implode("/", $param);
} else {
$filename = $param[0];
}
$content_type = $this->get_content_type($this->type);
if (file_exists(TMPL_DIR . $tmpl_dir . $this->type . "/" . $filename)) {
$real_filename = TMPL_DIR . $tmpl_dir . $this->type . "/" . $filename;
} elseif (file_exists(TMPL_DIR . "default/" . $this->type . "/" . $filename)) {
$real_filename = TMPL_DIR . "default/" . $this->type . "/" . $filename;
} else {
/**
* @TODO: ggf. default-Dateien?
*/
header("HTTP/1.0 404 Not Found");
return;
}
header("Content-Type: {$content_type}");
app::$output = file_get_contents($real_filename);
return;
}
示例2: fetch_resource
public function fetch_resource($type)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
$param = app::$param;
$req = app::$request;
if (!array_key_exists("playername", $req)) {
header("HTTP/1.0 404 Not Found");
return;
}
$player = $req['playername'];
$cls = "model_player" . date("Y");
$avatar = $cls::get_entry_by_playername($player);
if (is_null($avatar->avatar_mime) || $avatar->avatar_mime == "") {
header("HTTP/1.0 404 Not Found");
return;
}
header("Content-Type: " . $avatar->avatar_mime);
app::$output = stripslashes($avatar->avatar);
return;
}
示例3: fetch_resource
public function fetch_resource($type)
{
// debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
$param = app::$param;
$req = app::$request;
if (!array_key_exists("type", $req) && !array_key_exists("month", $req)) {
header("HTTP/1.0 404 Not Found");
return;
}
$type = $req['type'];
$month = intval(date("m"));
if (array_key_exists("month", $req)) {
$month = intval($req['month']);
}
$cls = "model_award" . date("Y");
$awrd = $cls::get_entry_by_month_type($month, $type);
header("Content-Type: " . $awrd->mime);
app::$output = stripslashes($awrd->file);
return;
}