本文整理匯總了PHP中IPSText::transliterate方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSText::transliterate方法的具體用法?PHP IPSText::transliterate怎麽用?PHP IPSText::transliterate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSText
的用法示例。
在下文中一共展示了IPSText::transliterate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: printHeader
/**
* Prints any header information for this output module
*
* @access public
* @return @e void Prints header() information
*/
public function printHeader()
{
//-----------------------------------------
// Start GZIP compression
//-----------------------------------------
if ($this->settings['disable_gzip'] != 1) {
$buffer = "";
if (count(ob_list_handlers())) {
$buffer = ob_get_contents();
ob_end_clean();
}
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) and strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
@ob_start('ob_gzhandler');
} else {
@ob_start();
}
print $buffer;
}
if (isset($_SERVER['SERVER_PROTOCOL']) and strstr($_SERVER['SERVER_PROTOCOL'], '/1.0')) {
header("HTTP/1.0 " . $this->_headerCode . ' ' . $this->_headerStatus);
} else {
header("HTTP/1.1 " . $this->_headerCode . ' ' . $this->_headerStatus);
}
if ($this->settings['print_headers']) {
/* Forcing a download? */
if ($this->_forceDownload) {
header("Content-type: unknown/unknown");
header("Content-Disposition: attachment; filename=\"" . IPSText::alphanumericalClean(IPSText::transliterate(mb_strtolower($this->registry->output->getTitle()))) . ".html\"");
} else {
header("Content-type: text/html;charset=" . IPS_DOC_CHAR_SET);
}
if ($this->settings['nocache']) {
$expires = $this->_headerExpire ? gmdate("D, d M Y H:i:s", time() + $this->_headerExpire) . " GMT" : gmdate("D, d M Y H:i:s", time() - 86400) . " GMT";
$maxAge = $this->_headerExpire;
$nocache = !$this->_headerExpire ? 'no-cache, ' : '';
header("Cache-Control: " . $nocache . "must-revalidate, max-age=" . $maxAge);
header("Expires: " . $expires);
if (!$this->_headerExpire) {
header("Pragma: no-cache");
}
}
}
}