本文整理汇总了PHP中send_nocache_header函数的典型用法代码示例。如果您正苦于以下问题:PHP send_nocache_header函数的具体用法?PHP send_nocache_header怎么用?PHP send_nocache_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了send_nocache_header函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtolower
$parts[0] = strtolower($parts[0]);
if ($parts[0] == 'doc' || $parts[0] == 'lang') {
$title = $db->escape_string($title);
} else {
$title = $gpc->save_str($title);
}
return $title;
} else {
return '';
}
}
define('EDITOR_IMAGEDIR', './uploads/images/');
$supportedextentions = array('gif', 'png', 'jpeg', 'jpg');
($code = $plugins->load('admin_cms_jobs')) ? eval($code) : null;
if ($job == 'nav') {
send_nocache_header();
echo head();
?>
<table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td class="obox"><?php
echo $lang->phrase('admin_cms_head_manage_navigation');
?>
</td>
</tr>
<tr>
<td class="mbox center">
<a class="button" href="admin.php?action=cms&job=nav_add"><?php
echo $lang->phrase('admin_cms_manage_navigation_add_link');
?>
</a>
示例2: makeImage
function makeImage($session_expired_lang = 'Session Error<br>Refresh the Page')
{
global $config, $gpc;
$challenge = $gpc->get('challenge');
$this->settings['colortext'] = (bool) $config['botgfxtest_colortext'];
$this->settings['filter'] = (bool) $config['botgfxtest_filter'];
$jpeg_quality = (int) $config['botgfxtest_quality'];
$format = $config['botgfxtest_format'] == 'png' ? 'PNG' : 'JPEG';
if ((ImageTypes() & constant("IMG_{$format}")) == false) {
$format = $format == 'PNG' ? 'JPEG' : 'PNG';
}
$lines = file($this->datasource);
$lines = array_map('trim', $lines);
foreach ($lines as $row) {
if (empty($row)) {
continue;
}
$data = explode("\t", $row);
if ($data[0] == $challenge) {
$this->session = array('word' => $data[2], 'id' => $data[1]);
break;
}
}
if (empty($this->session['word'])) {
$this->_errorImage($session_expired_lang);
}
// Generate the image
$im = $this->_drawImage();
send_nocache_header();
switch ($format) {
case 'PNG':
header("Content-type: image/png");
imagepng($im);
break;
default:
header("Content-type: image/jpeg");
imagejpeg($im, '', $jpeg_quality);
}
imagedestroy($im);
}