本文整理汇总了PHP中Log::disable_display方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::disable_display方法的具体用法?PHP Log::disable_display怎么用?PHP Log::disable_display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Log
的用法示例。
在下文中一共展示了Log::disable_display方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: attach_self
/**
* phpinfoからattachする
* @param string $path
*/
public function attach_self($path)
{
$this->url($_SERVER["PHP_SELF"] . "/");
if ($this->args() != null) {
Log::disable_display();
Http::attach(new File($path . $this->args()));
exit;
}
}
示例2: output
/**
* xmlとし出力する
* @param string $encoding エンコード名
* @param string $name ファイル名
*/
public function output($encoding = null, $name = null)
{
Log::disable_display();
header(sprintf('Content-Type: application/xml%s', empty($name) ? '' : sprintf('; name=%s', $name)));
print $this->get($encoding);
exit;
}
示例3: attach_self
/**
* phpinfoからattachする
* @param string $path
*/
protected final function attach_self($path)
{
$this->media_url(Request::current_url() . '/');
if ($this->args() != null) {
Log::disable_display();
Http::attach(new File($path . $this->args()));
exit;
}
}
示例4: __init__
protected function __init__()
{
Log::disable_display();
$this->add_module(new OpenpearAccountModule());
}
示例5: output
/**
* 出力する
*
* @param string $name
*/
public function output($name = "")
{
Log::disable_display();
header(sprintf("Content-Type: application/rss+xml; name=%s", empty($name) ? uniqid("") : $name));
print $this->get(true);
exit;
}
示例6: declare
<?php
declare (ticks=1);
require dirname(__FILE__) . '/__settings__.php';
import('core.Log');
import('core.Request');
Log::disable_display();
import('Chat.ChatServer');
header('application/x-javascript');
$req = new Request();
$object_list = C(ChatMessage)->find_all(Q::gt('id', $req->inVars('since_id', 0)), Q::order('-id'));
if (count($object_list) > 0) {
echo ChatServer::models_to_jsonp(array_reverse($object_list), $req->inVars('callback', 'callback'));
exit;
}
$server = new ChatServer();
pcntl_signal(SIGTERM, array(&$server, 'models_json'));
pcntl_signal(SIGHUP, array(&$server, 'models_json'));
pcntl_signal(SIGUSR1, array(&$server, 'models_json'));
sleep(def('chat@timeout'));
示例7: output
/**
* 標準出力に出力する
*/
public function output()
{
Log::disable_display();
if (empty($this->value) && @is_file($this->fullname)) {
readfile($this->fullname);
} else {
print $this->value;
}
exit;
}
示例8: output_jsonp
/**
* JSONPとして出力
* @param mixied $var 対象の値
* @param string $callback コールバック名
* @param string $encode 文字エンコード
*/
public static function output_jsonp($var, $callback = null, $encode = "UTF-8")
{
Log::disable_display();
header("Content-Type: application/json; charset=" . $encode);
print str_replace(array("\r\n", "\r", "\n"), array("\\n"), empty($callback) ? Text::to_json($var) : $callback . "(" . Text::to_json($var) . ");");
exit;
}
示例9: handler
/**
* リポジトリサーバの実行
*/
public static function handler()
{
Log::disable_display();
$request = new Request("_inc_session_=false");
if (strpos($request->args(), "/check") === 0) {
exit;
}
$repository = new Repository();
self::lib($repository);
self::app($repository);
Object::C(__CLASS__)->call_module("repository", $repository);
foreach ($repository->names as $type) {
if (preg_match("/^\\/" . $type . "\\/download\\/(.+)\$/", $request->args(), $match)) {
if (self::is_tgz($type, $match[1], $filename)) {
self::dl($filename);
}
}
if (preg_match("/^\\/" . $type . "\\/state\\/(.+)\$/", $request->args(), $match)) {
if (self::is_tgz($type, $match[1], $filename)) {
exit;
}
}
if (preg_match("/^\\/" . $type . "\\/list\$/", $request->args(), $match)) {
print self::read_xml($type);
exit;
}
if (preg_match("/^\\/" . $type . "\\/list\\/json\$/", $request->args(), $match)) {
if (Tag::setof($tag, self::read_xml($type))) {
Text::output_jsonp($tag, $request->in_vars("callback"));
}
}
}
Http::status_header(403);
exit;
}
示例10: redirect
/**
* リダイレクトする
* @param string $url リダイレクトするURL
* @param mixed{} $vars query文字列として渡す変数
*/
public static function redirect($url, array $vars = array())
{
Log::disable_display();
if (!empty($vars)) {
$requestString = self::query($vars);
if (substr($requestString, 0, 1) == "?") {
$requestString = substr($requestString, 1);
}
$url = sprintf("%s?%s", $url, $requestString);
}
Log::debug("redirect: " . $url);
Log::flush();
header("Location: " . $url);
exit;
}