if (empty($modelInfo)) {
$this->error('模型不存在!');
}
//更新点击量
Db::name($modelInfo['tablename'])->where('id', $id)->setInc('hits');
//内容所有字段
$ifcache = $this->cmsConfig['site_cache_time'] ? $this->cmsConfig['site_cache_time'] : false;
$info = $this->Cms_Model->getContent($modelid, ['catid' => $catid, 'id' => $id], true, '*', '', $ifcache);
if (!$info || ($info['status'] !== 1 && !\app\admin\service\User::instance()->isLogin())) {
throw new \think\Exception('内容不存在或未审核!', 404);
}
//内容分页
$paginator = strpos($info['content'], '[page]');
if ($paginator !== false) {
$contents = array_filter(explode('[page]', $info['content']));
$total = count($contents);
$pages = \app\cms\paginator\Page::make([], 1, $page, $total, false, ['path' => $this->request->baseUrl()]);
//判断[page]出现的位置是否在第一位
if ($paginator < 7) {
USER | www |
HOME | /home/www |
PATH_TRANSLATED | redirect:/index.php/153/15.html |
PATH_INFO | /shows/153/15.html |
SCRIPT_NAME | /index.php |
REQUEST_URI | /index.php/shows/153/15.html |
QUERY_STRING | |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REMOTE_PORT | 34612 |
SCRIPT_FILENAME | /www/wwwroot/mirhz.com/index.php |
SERVER_ADMIN | webmaster@example.com |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/mirhz.com/ |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | /www/wwwroot/mirhz.com/ |
REMOTE_ADDR | 3.239.15.34 |
SERVER_PORT | 80 |
SERVER_ADDR | 172.16.221.88 |
SERVER_NAME | www.mirhz.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | <address>Apache Server at www.mirhz.com Port 80</address> |
LD_LIBRARY_PATH | /www/server/apache/lib |
PATH | /www/server/panel/pyenv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin |
HTTP_HOST | www.mirhz.com |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
proxy-nokeepalive | 1 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/shows/153/15.html |
REQUEST_TIME_FLOAT | 1711695160.3373 |
REQUEST_TIME | 1711695160 |
ROOT_PATH | /www/wwwroot/mirhz.com/ |
APP_PATH | /www/wwwroot/mirhz.com/application/ |
DS | / |
ADDON_PATH | /www/wwwroot/mirhz.com/addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/mirhz.com/templates/ |
PINYIN_DEFAULT | 4096 |
PINYIN_TONE | 2 |
PINYIN_NO_TONE | 4 |
PINYIN_ASCII_TONE | 8 |
PINYIN_NAME | 16 |
PINYIN_KEEP_NUMBER | 32 |
PINYIN_KEEP_ENGLISH | 64 |
PINYIN_UMLAUT_V | 128 |
PINYIN_KEEP_PUNCTUATION | 256 |