[8] ErrorException in Literature.php line 59

未定义数组索引: DirPath

  1. $uid = $this->uid;
  2. $info = DocModel::get(['Id'=>$id]);
  3. $info['back'] = isset($_SERVER['HTTP_REFERER']) ? 1 : 2;//1有2无
  4. // $filename=Docfilename::where('docdetail_id',$id)->select();
  5. // foreach ($filename as $k=>$v){
  6. // $filename[$k]['paths']=substr($v['new_name'],-3);
  7. // }
  8. // $this->assign(['file'=>$filename]);
  9. $DirPaths = ltrim($info['DirPath'],'/');
  10. if(strpos($DirPaths,'/')!==false){
  11. $info['DirPatharray']=array_filter(explode('/', $DirPaths));
  12. }else{
  13. $info['DirPatharray']=array(0=> $DirPaths);
  14. }
  15. foreach ($info['DirPatharray'] as $k=>$v){
  16. $filename=Docfilename::where('new_name',$v)->find();
  17. if(!empty($filename['new_name'])) $filename['paths'] = substr($filename['new_name'],-3);

Call Stack

  1. in Literature.php line 59
  2. at Error::appError(8, 'Undefined index: Dir...', '/var/www/wells.org.c...', 59, ['id' => '1375', 'request' => object(Request), 'nexturl' => '/index.php/home/Lite...', ...]) in Literature.php line 59
  3. at Literature->detail('1375')
  4. at ReflectionMethod->invokeArgs(object(Literature), ['1375']) in App.php line 343
  5. at App::invokeMethod([object(Literature), 'detail'], []) in App.php line 611
  6. at App::module(['home', 'Literature', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['home', 'Literature', 'detail']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/var/www/wells.org.c...') in index.php line 24

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "nexturl": "\/index.php\/home\/Literature\/detail\/id\/1375.html" }

Server/Request Data

UNIQUE_ID
ZgXv@7Y7kVUVd5Lu-ASnhwAAAAo
HTTPS
on
SSL_TLS_SNI
www.wells.org.cn
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_REFERER
http://www.wells.org.cn/home/Literature/detail/id/1375.html
HTTP_HOST
www.wells.org.cn
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.6 (CentOS) PHP/5.5.36 OpenSSL/1.0.2k-fips
SERVER_NAME
www.wells.org.cn
SERVER_ADDR
172.17.131.107
SERVER_PORT
443
REMOTE_ADDR
3.89.163.120
DOCUMENT_ROOT
/var/www/wells.org.cn/public
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/var/www/wells.org.cn/public
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/var/www/wells.org.cn/public/index.php
REMOTE_PORT
47208
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/index.php/home/Literature/detail/id/1375.html
SCRIPT_NAME
/index.php
PATH_INFO
/home/Literature/detail/id/1375.html
PATH_TRANSLATED
redirect:/index.php/home/Literature/detail/id/1375.html/detail/id/1375.html
PHP_SELF
/index.php/home/Literature/detail/id/1375.html
REQUEST_TIME_FLOAT
1711665147.099
REQUEST_TIME
1711665147
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/var/www/wells.org.cn/public/../application/
APP_ROOT
/var/www/wells.org.cn/public
APP_GEN
/var/www/wells.org.cn/public
THINK_VERSION
5.0.24
THINK_START_TIME
1711665147.1001
THINK_START_MEM
257840
EXT
.php
DS
/
THINK_PATH
/var/www/wells.org.cn/thinkphp/
LIB_PATH
/var/www/wells.org.cn/thinkphp/library/
CORE_PATH
/var/www/wells.org.cn/thinkphp/library/think/
TRAIT_PATH
/var/www/wells.org.cn/thinkphp/library/traits/
ROOT_PATH
/var/www/wells.org.cn/
EXTEND_PATH
/var/www/wells.org.cn/extend/
VENDOR_PATH
/var/www/wells.org.cn/vendor/
RUNTIME_PATH
/var/www/wells.org.cn/runtime/
LOG_PATH
/var/www/wells.org.cn/runtime/log/
CACHE_PATH
/var/www/wells.org.cn/runtime/cache/
TEMP_PATH
/var/www/wells.org.cn/runtime/temp/
CONF_PATH
/var/www/wells.org.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ROOT_PATHS
/var/www/wells.org.cn/
PLUGINS_PATH
/var/www/wells.org.cn/plugins
HOME_SITE_ROOT
https://www.wells.org.cn/home
BASE_SITE_URL
https://www.wells.org.cn/index.php
HOME_SITE_URL
https://www.wells.org.cn/index.php/home
TIMESTAMP
1711665147