return $cate;
}
/**
* 更新内容的点击数
* @param string $id 内容id
* @param string $tableName 表名称(含前缀)
* @return bool
*/
public function addHits(string $id, string $tableName)
{
// 判断当前表是否存在hits字段
if ($this->_iset_field(Config::get('database.connections.mysql.prefix') . $tableName, 'hits')) {
Db::name($tableName)
->where('id', $id)
->inc('hits')
->update();
return true;
}
cate | 17 |
id | 184 |
USER | www |
HOME | /home/www |
PATH_TRANSLATED | /www/wwwroot/SIYUCMS/public//index/Article/info.html |
ORIG_SCRIPT_FILENAME | /www/wwwroot/SIYUCMS/public/index.php//index/Article/info.html |
HTTP_HOST | ldhly.com |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
REDIRECT_STATUS | 200 |
SERVER_NAME | siyu.ldhly.com |
SERVER_PORT | 80 |
SERVER_ADDR | 172.17.168.88 |
REMOTE_PORT | 59272 |
REMOTE_ADDR | 54.224.52.210 |
SERVER_SOFTWARE | nginx/1.17.10 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/SIYUCMS/public |
DOCUMENT_URI | /index.php//index/Article/info.html |
REQUEST_URI | /index/Article/info.html?cate=17&id=184 |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | cate=17&id=184 |
SCRIPT_NAME | /index.php//index/Article/info.html |
SCRIPT_FILENAME | /www/wwwroot/SIYUCMS/public/index.php |
PATH_INFO | //index/Article/info.html |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php//index/Article/info.html//index/Article/info.html |
REQUEST_TIME_FLOAT | 1711788733.4115 |
REQUEST_TIME | 1711788733 |