return $this->fetch($template);
}
}
public function info(){
$id = intval(input('id'));
Db::name(DBNAME)->where('id',$id)->setInc('hits');
$info = Db::name(DBNAME)->where(['id'=>$id,'status'=>1])->find();
if(!$info)
throw new \think\exception\HttpException(404);
$info['pic'] = isset($info['pic'])?$info['pic']:config('view_replace_str.__HOME__'). "/images/sample-images/blog-post".mt_rand(1,3). ".jpg";
$info['title_thumb'] = isset($info['thumb']) && $info['thumb']?$info['thumb']:config('view_replace_str.__HOME__').'/images/sample-images/blog-post'.mt_rand(1,3).'.jpg';
$info['title_style'] = isset($info['title_style'])? $info['title_style']:'';
if(DBNAME=='picture'){
$pics = explode(':::',$info['pics']);
foreach ($pics as $k=>$v){
$info['pics'][$k] = explode('|',$v);
}
}
USER | www |
HOME | /home/www |
HTTP_CACHE_CONTROL | public, max-age=86400 |
HTTP_HOST | www.scfzw.net |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | keep-alive |
HTTP_ACCEPT_ENCODING | gzip, br |
PHP_ADMIN_VALUE | open_basedir=/data/wwwroot/www.scfz.org/public/:/tmp/:/proc/:/data/wwwroot |
REDIRECT_STATUS | 200 |
SERVER_NAME | scfzw.net |
SERVER_PORT | 80 |
SERVER_ADDR | 192.168.0.34 |
REMOTE_PORT | 60338 |
REMOTE_ADDR | 172.104.58.121 |
SERVER_SOFTWARE | nginx/1.16.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /data/wwwroot/www.scfz.org/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /jiansuo/7/index.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//jiansuo/7/index.html |
SCRIPT_FILENAME | /data/wwwroot/www.scfz.org/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1729530129.9506 |
REQUEST_TIME | 1729530129 |
MAX_MENU_LENGTH | 3 |
MAX_SUB_MENU_LENGTH | 5 |
MODULE_NAME | jiansuo |
ACTION_NAME | info |
DBNAME | article |
ISPAGE | 0 |