本文整理汇总了PHP中Daemon::req方法的典型用法代码示例。如果您正苦于以下问题:PHP Daemon::req方法的具体用法?PHP Daemon::req怎么用?PHP Daemon::req使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Daemon
的用法示例。
在下文中一共展示了Daemon::req方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onSleep
/**
* Called when the request starts sleep
* @return void
*/
public function onSleep()
{
ob_flush();
if (!Daemon::$compatMode) {
Daemon::$process->setStatus(1);
}
Daemon::$req = NULL;
$this->running = FALSE;
}
示例2: autoindex
public function autoindex($dir)
{
$this->onWakeup();
Daemon::$req = $this;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Index of /</title>
<style type="text/css">
a, a:active {text-decoration: none; color: blue;}
a:visited {color: #48468F;}
a:hover, a:focus {text-decoration: underline; color: red;}
body {background-color: #F5F5F5;}
h2 {margin-bottom: 12px;}
table {margin-left: 12px;}
th, td { font: 90% monospace; text-align: left;}
th { font-weight: bold; padding-right: 14px; padding-bottom: 3px;}
td {padding-right: 14px;}
td.s, th.s {text-align: right;}
div.list { background-color: white; border-top: 1px solid #646464; border-bottom: 1px solid #646464; padding-top: 10px; padding-bottom: 14px;}
div.foot { font: 90% monospace; color: #787878; padding-top: 4px;}
</style>
</head>
<body>
<pre class="header">Welcome!</pre><h2>Index of /</h2>
<div class="list">
<table summary="Directory Listing" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="n">Name</th>
<th class="t">Type</th>
</tr>
</thead>
<tbody>
<tr>
<td class="n"><a href="../">Parent Directory</a>/</td>
<td class="t">Directory</td>
</tr>
<?php
foreach ($dir['dents'] as $item) {
$type = $item['type'] === EIO_DT_DIR ? 'Directory' : MIME::get($path);
?>
<tr>
<td class="n"><a href="<?php
echo htmlspecialchars($item['name']) . ($type == 'Directory' ? '/' : '');
?>
"><?php
echo htmlspecialchars($item['name']);
?>
</a></td>
<td class="t"><?php
echo $type;
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div> <?php
if ($this->upstream->config->expose->value) {
?>
<div class="foot">phpDaemon/<?php
echo Daemon::$version;
?>
</div><?php
}
?>
</body>
</html><?php
}