本文整理汇总了PHP中ob_out函数的典型用法代码示例。如果您正苦于以下问题:PHP ob_out函数的具体用法?PHP ob_out怎么用?PHP ob_out使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ob_out函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showmessage
function showmessage($msgkey, $url_forward = '', $second = 1, $values = array())
{
global $_SGLOBAL, $_SC, $_SCONFIG, $_TPL, $space, $_SN;
obclean();
//去掉广告
$_SGLOBAL['ad'] = array();
//语言
include_once S_ROOT . './language/lang_showmessage.php';
if (isset($_SGLOBAL['msglang'][$msgkey])) {
$message = lang_replace($_SGLOBAL['msglang'][$msgkey], $values);
} else {
$message = $msgkey;
}
//手机
if ($_SGLOBAL['mobile']) {
include template('showmessage');
exit;
}
//显示
if (empty($_SGLOBAL['inajax']) && $url_forward && empty($second)) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: {$url_forward}");
} else {
if ($_SGLOBAL['inajax']) {
if ($url_forward) {
$message = "<a href=\"{$url_forward}\">{$message}</a><ajaxok>";
}
//$message = "<h1>".$_SGLOBAL['msglang']['box_title']."</h1><a href=\"javascript:;\" onclick=\"hideMenu();\" class=\"float_del\">X</a><div class=\"popupmenu_inner\">$message</div>";
echo $message;
ob_out();
} else {
if ($url_forward) {
$message = "<a href=\"{$url_forward}\">{$message}</a><script>setTimeout(\"window.location.href ='{$url_forward}';\", " . $second * 1000 . ");</script>";
}
include template('showmessage');
}
}
exit;
}
示例2: atturl
function atturl($imageurl)
{
global $_SC;
return '<img src="' . $_SC['uchurl'] . '/' . $imageurl . '">';
}
$title = $blogdetail['subject'] . ' - ' . $_SCONFIG['sitename'];
$keywords = $blogdetail['subject'] . ',' . $lang['uchblog'];
$description = $blogdetail['subject'] . ',' . $lang['uchblog'];
$guidearr = array();
$guidearr[] = array('url' => geturl('action/uchblog'), 'name' => $channels['menus']['uchblog']['name']);
$guidearr[] = array('url' => geturl('action/bloglist'), 'name' => $lang['bloglist']);
$tplname = 'blog_detail';
$title = strip_tags($title);
$keywords = strip_tags($keywords);
$description = strip_tags($description);
include template($tplname);
ob_out();
if (!empty($_SCONFIG['htmlindex'])) {
ehtml('make');
} else {
maketplblockvalue('cache');
}
function addurlhttp($m)
{
global $_SC;
if (preg_grep("/^http\\:/", array($m[2]))) {
return 'src="' . $m[2] . '.' . $m[3] . '"';
} else {
return 'src="' . $_SC['uchurl'] . '/' . $m[2] . '.' . $m[3] . '"';
}
}
示例3: showmessage
function showmessage($message, $url_forward = '', $second = 3, $vars = array())
{
global $_SGLOBAL, $_SCONFIG, $_SC, $channels;
if (empty($_SGLOBAL['inajax']) && $url_forward && empty($second)) {
//Ö±½Ó301Ìøת
obclean();
header("HTTP/1.1 301 Moved Permanently");
header("Location: {$url_forward}");
} else {
if (!defined('IN_SUPESITE_ADMINCP')) {
$tpl_file = 'showmessage';
$fullpath = 0;
include_once S_ROOT . './language/message.lang.php';
if (!empty($mlang[$message])) {
$message = $mlang[$message];
}
} else {
$tpl_file = 'admin/tpl/showmessage.htm';
$fullpath = 1;
include_once S_ROOT . './language/admincp_message.lang.php';
if (!empty($amlang[$message])) {
$message = $amlang[$message];
}
}
if (isset($_SGLOBAL['mlang'][$message])) {
$message = $_SGLOBAL['mlang'][$message];
}
foreach ($vars as $key => $val) {
$message = str_replace('{' . $key . '}', $val, $message);
}
//ÏÔʾ
obclean();
if (!empty($url_forward)) {
$second = $second * 1000;
$message .= "<script>setTimeout(\"window.location.href ='{$url_forward}';\", {$second});</script><ajaxok>";
}
include template($tpl_file, $fullpath);
ob_out();
}
exit;
}