[8] ErrorException in Base.php line 36

未定义数组下标: 2

  1. }
  2. public function isCurrNav()
  3. {
  4. $url= $this->request->url();
  5. if($url=='/')
  6. {
  7. return 'Index/index';
  8. }else{
  9. $arr= explode("/", $url);
  10. return $arr[2]."/index";
  11. }
  12. }
  13. public function getcurrinfo()
  14. {
  15. $url= $this->isCurrNav();
  16. if($url!='Index/index')
  17. {
  18. $nav= db("nav")->where("url='{$url}'")->find();

Call Stack

  1. in Base.php line 36
  2. at Error::appError(8, 'Undefined offset: 2', 'C:\wwwroot\ruianxiao...', 36, ['url' => '/?ohc=5ONEDHPNB', 'arr' => ['', '?ohc=5ONEDHPNB']]) in Base.php line 36
  3. at Base->isCurrNav() in Base.php line 9
  4. at Base->_initialize() in Controller.php line 57
  5. at Controller->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 216
  7. at App::invokeClass('app\index\controller...') in Loader.php line 420
  8. at Loader::controller('index', 'controller', false, 'Error') in App.php line 388
  9. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 296
  10. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  11. at App::run() in start.php line 18
  12. at require('C:\wwwroot\ruianxiao...') in index.php line 17

Exception Datas

Error Context
url
/?ohc=5ONEDHPNB
arr
[ "", "?ohc=5ONEDHPNB" ]

Environment Variables

GET Data

ohc
5ONEDHPNB
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

_FCGI_X_PIPE_
\\.\pipe\IISFCGI-8d835068-2970-4057-9a43-be75a13af4a8
PHPRC
C:\Program Files (x86)\PHP\php-7.1.25-nts-Win32-VC14-x64\
PHP_FCGI_MAX_REQUESTS
10000
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
C:\inetpub\temp\apppools\ryann.cn\ryann.cn.config
APP_POOL_ID
ryann.cn
CommonProgramFiles
C:\Program Files\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
iZaj0lkzce74v9Z
ComSpec
C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK
NO
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
2
OS
Windows_NT
Path
C:\Program Files\PHP\v5.3;C:\Windows\system32\inetsrv;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
5504
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files
ProgramFiles(x86)
C:\Program Files (x86)
ProgramW6432
C:\Program Files
PSModulePath
C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC
C:\Users\Public
SystemDrive
C:
SystemRoot
C:\Windows
TEMP
C:\Windows\TEMP
TMP
C:\Windows\TEMP
USERDOMAIN
WORKGROUP
USERNAME
iZaj0lkzce74v9Z$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
ORIG_PATH_INFO
/index.php
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/8.5
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
0
SERVER_PORT
80
SERVER_NAME
ryann.cn
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
C:\wwwroot\ruianxiaofang\web\public\index.php
REQUEST_URI
/?ohc=5ONEDHPNB
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
20000
REMOTE_HOST
154.212.113.61
REMOTE_ADDR
154.212.113.61
QUERY_STRING
ohc=5ONEDHPNB
PATH_TRANSLATED
C:\wwwroot\ruianxiaofang\web\public\index.php
LOGON_USER
LOCAL_ADDR
172.26.20.77
INSTANCE_META_PATH
/LM/W3SVC/2
INSTANCE_NAME
RYANN.CN
INSTANCE_ID
2
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS
off
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
C:\wwwroot\ruianxiaofang\web\public
CONTENT_TYPE
CONTENT_LENGTH
0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH
C:\wwwroot\ruianxiaofang\web\public\
APPL_MD_PATH
/LM/W3SVC/2/ROOT
IIS_UrlRewriteModule
7,1,1993,2351
WEBSOCKET_VERSION
13
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
ryann.cn
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_CONTENT_LENGTH
0
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1582342990.6403
REQUEST_TIME
1582342990
PATH_INFO
Environment Variables
empty

ThinkPHP Constants

APP_PATH
C:\wwwroot\ruianxiaofang\web\public/../application/
THINK_VERSION
5.0.11
THINK_START_TIME
1582342990.6414
THINK_START_MEM
367056
EXT
.php
DS
\
THINK_PATH
C:\wwwroot\ruianxiaofang\web\thinkphp\
LIB_PATH
C:\wwwroot\ruianxiaofang\web\thinkphp\library\
CORE_PATH
C:\wwwroot\ruianxiaofang\web\thinkphp\library\think\
TRAIT_PATH
C:\wwwroot\ruianxiaofang\web\thinkphp\library\traits\
ROOT_PATH
C:\wwwroot\ruianxiaofang\web\
EXTEND_PATH
C:\wwwroot\ruianxiaofang\web\extend\
VENDOR_PATH
C:\wwwroot\ruianxiaofang\web\vendor\
RUNTIME_PATH
C:\wwwroot\ruianxiaofang\web\runtime\
LOG_PATH
C:\wwwroot\ruianxiaofang\web\runtime\log\
CACHE_PATH
C:\wwwroot\ruianxiaofang\web\runtime\cache\
TEMP_PATH
C:\wwwroot\ruianxiaofang\web\runtime\temp\
CONF_PATH
C:\wwwroot\ruianxiaofang\web\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true