$category = getCategory($cat);
if (empty($category)) {
$this->error('栏目不存在!');
}
$catid = $category['id'];
//模型ID
$modelid = $category['modelid'];
$modelInfo = cache('Model')[$modelid];
if (empty($modelInfo)) {
throw new \think\Exception('栏目不存在!', 404);
}
//更新点击量
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, "id={$id}", true, '*', '', $ifcache);
if (!$info || ($info['status'] !== 1 && !\app\admin\service\User::instance()->isLogin())) {
throw new \think\Exception('内容不存在或未审核!', 404);
}
USER | www |
HOME | /home/www |
HTTP_REFERER | https://www.adtek.com.cn/shows/6/27.html |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.adtek.com.cn |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.adtek.com.cn |
SERVER_PORT | 443 |
SERVER_ADDR | 172.17.205.134 |
REMOTE_PORT | 55926 |
REMOTE_ADDR | 3.235.227.36 |
SERVER_SOFTWARE | nginx/1.20.2 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/www.adtek.com.cn |
DOCUMENT_URI | /index.php |
REQUEST_URI | /contact/27.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/contact/27.html |
SCRIPT_FILENAME | /www/wwwroot/www.adtek.com.cn/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711627077.6537 |
REQUEST_TIME | 1711627077 |
ADMIN_URL | adtekadmin |
ROOT_PATH | /www/wwwroot/www.adtek.com.cn/ |
APP_PATH | /www/wwwroot/www.adtek.com.cn/application/ |
DS | / |
ADDON_PATH | /www/wwwroot/www.adtek.com.cn/addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/www.adtek.com.cn/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 |