$info = $this->Cms_Model->getContent($modelid, "customurl='{$customurl}'", true, '*', '', $ifcache);
} else {
$info = $this->Cms_Model->getContent($modelid, "id={$id}", true, '*', '', $ifcache);
}
$id = $info['id'];
//更新点击量
Db::name($modelInfo['tablename'])->where('id', $id)->setInc('hits');
// $info = $this->Cms_Model->getContent($modelid, "id={$id}", true, '*', '', $ifcache);
if (!$info || ($info['status'] !== 1 && !\app\admin\service\User::instance()->isLogin())) {
throw new \think\Exception('Content does not exist or has not been reviewed!', 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 |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.zkteco.vn |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.zkteco.vn |
SERVER_PORT | 443 |
SERVER_ADDR | 172.31.25.73 |
REMOTE_PORT | 58286 |
REMOTE_ADDR | 54.234.233.157 |
SERVER_SOFTWARE | nginx/1.22.0 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/www.zkteco.vn |
DOCUMENT_URI | /index.php |
REQUEST_URI | /Tin-Tuc/ZKTeco-Ranked-13-in-the-Top-50-Global-Security-Brands-2021-by-a-s-Magazine |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/Tin-Tuc/ZKTeco-Ranked-13-in-the-Top-50-Global-Security-Brands-2021-by-a-s-Magazine |
SCRIPT_FILENAME | /www/wwwroot/www.zkteco.vn/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711701761.5198 |
REQUEST_TIME | 1711701761 |
GZIP_ENABLE | true |
ADMIN_URL | @ZKTeco_backstage_login |
ROOT_PATH | /www/wwwroot/www.zkteco.vn/ |
APP_PATH | /www/wwwroot/www.zkteco.vn/application/ |
DS | / |
ADDON_PATH | /www/wwwroot/www.zkteco.vn/addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/www.zkteco.vn/templates/ |
HTMLPURIFIER_PREFIX | /www/wwwroot/www.zkteco.vn/vendor/ezyang/htmlpurifier/library |
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 |