class BocProduct extends Model
{
protected $cate_type = 'product-product-list';
//获取内容
public function get_info($cate_type,$cache_tag,$id){
$info = Cache::get($cate_type.'-'.$id);
if(empty($info)){
//更新浏览量
$info = self::field('*')->where('id', $id)->find()->toArray();
Cache::tag($cache_tag)->set($cate_type.'-'.$id,$info);
}
return $info;
}
//获取其它类型数据
public function get_list($cate_type,$cache_tag,$type = 'TENTIMES_LAND'){
//获取缓存
$list = Cache::get($cate_type.'-'.$type);
lang | zh-cn |
ssid | c0d398d3ebb002078f07f5a1d1690095 |
USER | www |
HOME | /home/www |
HTTP_COOKIE | lang=zh-cn; ssid=c0d398d3ebb002078f07f5a1d1690095 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.tiantai.com.cn |
HTTP_USER_AGENT | Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/) |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | tiantai.com.cn |
SERVER_PORT | 443 |
SERVER_ADDR | 172.21.126.135 |
REMOTE_PORT | 32828 |
REMOTE_ADDR | 45.38.63.50 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/new_tiantai/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /product/info/46/tentimes_land.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/product/info/46/tentimes_land.html |
SCRIPT_FILENAME | /www/wwwroot/new_tiantai/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1695095550.2231 |
REQUEST_TIME | 1695095550 |