if (empty($category)) {
throw new \think\exception\HttpException(404, '栏目不存在!');
}
$catid = $category['id'];
unset($category['id']);
//模型ID
$modelid = $category['modelid'];
$modelInfo = cache('Model')[$modelid];
if (empty($modelInfo)) {
throw new \think\exception\HttpException(404, '模型不存在!');
}
$content = Db::name($modelInfo['tablename'])->where('url', $title)->find();
//更新点击量
Db::name($modelInfo['tablename'])->where('id', $content['id'])->setInc('hits');
//内容所有字段
$ifcache = $this->cmsConfig['site_cache_time'] ? $this->cmsConfig['site_cache_time'] : false;
$info = $this->Cms_Model->getContent($modelid, ['catid' => $catid, 'url' => $title], true, '*', '', true);
if (!$info || ($info['status'] !== 1 && !\app\admin\service\User::instance()->isLogin())) {
throw new \think\exception\HttpException(404, '内容不存在或未审核!');
USER | www |
HOME | /home/www |
HTTP_REFERER | http://www.slag-pots.com/About-us.html |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.slag-pots.com |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.slag-pots.com |
SERVER_PORT | 443 |
SERVER_ADDR | 172.22.64.83 |
REMOTE_PORT | 52744 |
REMOTE_ADDR | 35.175.172.94 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/slag-pots/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /About-us.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/About-us.html |
SCRIPT_FILENAME | /www/wwwroot/slag-pots/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711631771.7632 |
REQUEST_TIME | 1711631771 |
IF_PUBLIC | true |
ROOT_PATH | /www/wwwroot/slag-pots/public/../ |
APP_PATH | /www/wwwroot/slag-pots/public/../application/ |
DS | / |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/slag-pots/public/../templates/ |
FILTER_VALIDATE_BOOL | 258 |
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 |
ADDON_PATH | /www/wwwroot/slag-pots/public/../addons/ |