本文整理匯總了PHP中post::prev_next方法的典型用法代碼示例。如果您正苦於以下問題:PHP post::prev_next方法的具體用法?PHP post::prev_next怎麽用?PHP post::prev_next使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類post
的用法示例。
在下文中一共展示了post::prev_next方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
header("Pragma: cache");
$domain = $cache->select_domain();
$id = $db->real_escape_string($_GET['id']);
if (!is_numeric($id)) {
$id = str_replace("#", "", $id);
}
$id = (int) $id;
$date = date("Ymd");
//Load post_table data and the previous next values in array. 0 previous, 1 next.
$post_data = $post->show($id);
//Check if data exists in array, if so, kinda ignore it.
if ($post_data == "" || is_null($post_data)) {
header('Location: index.php?page=post&s=list');
exit;
}
$prev_next = $post->prev_next($id);
if (!is_dir("{$main_cache_dir}" . "" . "\\cache/{$id}")) {
$cache->create_page_cache("cache/{$id}");
}
$data = $cache->load("cache/" . $id . "/post.cache");
if ($data !== false) {
echo str_replace("f6ca1c7d5d00a2a3fb4ea2f7edfa0f96a6d09c11717f39facabad2d724f16fbb", $domain, $data);
flush();
$tcount = 1;
} else {
ob_start();
$tags = mb_trim(html_entity_decode($post_data['tags'], ENT_QUOTES, "UTF-8"));
$ttags = explode(" ", $tags);
$rating = $post_data['rating'];
$lozerisdumb = "- " . str_replace('_', ' ', str_replace('"', '\\"', $tags));
$pg = "post";