1. //通过路由获取catid
  2. function get_route_catid(){
  3. $catid = 0;
  4. $route = request()->route();
  5. if(!empty($route['catid'])){
  6. $catid = $route['catid'];
  7. }elseif(!empty($route['catdir1']) || !empty($route['catdir2'])){
  8. $catdir = !empty($route['catdir1']) ? $route['catdir1'] : $route['catdir2'];
  9. $category = array_filter(get_category(), function($t) use ($catdir) { return $t['catdir'] == $catdir; });
  10. $catid = array_keys($category)[0];
  11. }
  12. if(check_catid($catid)){
  13. return $catid;
  14. }else{
  15. exit(myexception('栏目不存在!'));
  16. }
  17. }
  18. //通过路由获取城市
  19. function get_route_city(){

Call Stack

  1. in common.php line 238
  2. at Error::appError(8, 'Undefined offset: 0', 'D:\wwwroot\guanwang\...', 238, ['catid' => 0, 'route' => ['catdir1' => 'Contact.aspx'], 'catdir' => 'Contact.aspx', ...]) in common.php line 238
  3. at get_route_catid() in Index.php line 36
  4. at Index->lists(0)
  5. at ReflectionMethod->invokeArgs(object(Index), [0]) in App.php line 343
  6. at App::invokeMethod([object(Index), 'lists'], []) in App.php line 611
  7. at App::module([null, 'index', 'lists'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  8. at App::exec(['type' => 'module', 'module' => [null, 'index', 'lists'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('D:\wwwroot\guanwang\...') in index.php line 16

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
HTTP_HOST
www.btdc.com.cn
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip
PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;e:\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;e:\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;e:\Microsoft SQL Server\100\DTS\Binn\;D:\WAMP_PATH\php_71_x64;C:\Program Files (x86)\NetSarang\Xftp 7\;
SystemRoot
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.49 (Win64) OpenSSL/1.1.1l PHP/7.3.31
SERVER_NAME
www.btdc.com.cn
SERVER_ADDR
192.168.6.7
SERVER_PORT
80
REMOTE_ADDR
172.120.80.98
DOCUMENT_ROOT
D:/wwwroot/guanwang
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
D:/wwwroot/guanwang
SERVER_ADMIN
www@btdc.com.cn
SCRIPT_FILENAME
D:/wwwroot/guanwang/index.php
REMOTE_PORT
40662
REDIRECT_URL
/Contact.aspx
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/Contact.aspx
SCRIPT_NAME
/index.php
PATH_INFO
/Contact.aspx
PATH_TRANSLATED
redirect:\index.php\Contact.aspx
PHP_SELF
/index.php/Contact.aspx
REQUEST_TIME_FLOAT
1657849154.1571
REQUEST_TIME
1657849154
ALL_HTTP
Environment Variables
empty

ThinkPHP Constants

APP_PATH
D:\wwwroot\guanwang/application/
IN_LFCMS
true
THINK_VERSION
5.0.24
THINK_START_TIME
1657849154.2195
THINK_START_MEM
411328
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\guanwang\thinkphp\
LIB_PATH
D:\wwwroot\guanwang\thinkphp\library\
CORE_PATH
D:\wwwroot\guanwang\thinkphp\library\think\
TRAIT_PATH
D:\wwwroot\guanwang\thinkphp\library\traits\
ROOT_PATH
D:\wwwroot\guanwang\
EXTEND_PATH
D:\wwwroot\guanwang\extend\
VENDOR_PATH
D:\wwwroot\guanwang\vendor\
RUNTIME_PATH
D:\wwwroot\guanwang\runtime\
LOG_PATH
D:\wwwroot\guanwang\runtime\log\
CACHE_PATH
D:\wwwroot\guanwang\runtime\cache\
TEMP_PATH
D:\wwwroot\guanwang\runtime\temp\
CONF_PATH
D:\wwwroot\guanwang/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
Baidu
sogou