class Show extends IndexBase
{
public function initialize()
{
parent::initialize(); // TODO: Change the autogenerated stub
}
public function index(){
$self = CategoryModel::where(['static_dir'=>$this->request->param('name'), 'lang'=>session('lang')])->append(['tablename'])->find()->toArray();
if (empty($self)){
$this->error('栏目不存在或已删除');
}
$id = $this->request->param('id', 0);
$tablename = $self['tablename'];
$data = model($tablename)->find($id);
if (!$id && empty($data)){
$this->error('信息不存在或已删除');
think | { "lang": 1 } |
USER | www |
HOME | /home/www |
HTTP_REFERER | http://www.thtechnic.com/chanpin/danzhu |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.thtechnic.com |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | thtechnic.com |
SERVER_PORT | 443 |
SERVER_ADDR | 172.16.118.18 |
REMOTE_PORT | 35796 |
REMOTE_ADDR | 54.165.122.173 |
SERVER_SOFTWARE | nginx/1.18.0 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/thtechnic.com |
DOCUMENT_URI | /index.php |
REQUEST_URI | /chanpin/danzhu |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/chanpin/danzhu |
SCRIPT_FILENAME | /www/wwwroot/thtechnic.com/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711677839.0787 |
REQUEST_TIME | 1711677839 |
APP_PATH | /www/wwwroot/thtechnic.com/application/ |
ROOT_PATH | /www/wwwroot/thtechnic.com/ |
IF_PUBLIC | false |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/thtechnic.com/templates/ |