System Error

[8] ErrorException in Industry.php line 72

未定义数组索引: name

  1. public function projects(){
  2. $param = $this->request->param();
  3. $ResourcesInfoModel=new ResourcesInfoModel();
  4. $id = $param['base_id'];
  5. //项目数据
  6. $info = Db::table('shop')->where(['status'=>1,'base_id'=>$id])->find();
  7. $images = $ResourcesInfoModel->getMulti(['resources_id'=>['in',$info['images_id']]]);
  8. $info['images_info'] = $images;
  9. $this->assign('title',$info['name']);
  10. $this->assign('info',$info);
  11. return $this->fetch('projects');
  12. }
  13. }

Call Stack

  1. in Industry.php line 72
  2. at Error::appError(8, 'Undefined index: nam...', 'D:\phpStudy1\PHPTuto...', 72, ['param' => ['/index/Industry/projects_html' => '', 'base_id' => '2'], 'ResourcesInfoModel' => object(ResourcesInfoModel), 'id' => '2', ...]) in Industry.php line 72
  3. at Industry->projects()
  4. at ReflectionMethod->invokeArgs(object(Industry), []) in App.php line 343
  5. at App::invokeMethod([object(Industry), 'projects'], []) in App.php line 611
  6. at App::module(['index', 'Industry', 'projects'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'Industry', 'projects']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 18
  9. at require('D:\phpStudy1\PHPTuto...') in index.php line 16

Exception Datas

Error Context
param { "\/index\/Industry\/projects_html": "", "base_id": "2" }
ResourcesInfoModel
Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'array_merge(): Argument #1 is not an array' in D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php:783 Stack trace: #0 [internal function]: think\Error::appError(2, 'array_merge(): ...', 'D:\\phpStudy1\\PH...', 783, Array) #1 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php(783): array_merge('', Array) #2 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php(2125): think\Model->toArray() #3 [internal function]: think\Model->jsonSerialize() #4 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\tpl\think_exception.tpl(393): json_encode(Object(app\common\model\ResourcesInfoModel), 128) #5 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\exception\Handle.php(166): include('D:\\phpStudy1\\PH...') #6 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\exception\Handle.php(84): think\exception\Handle->convertExce in D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\tpl\think_exception.tpl on line 393

[1] ErrorException in think_exception.tpl line 393

Uncaught exception 'think\exception\ErrorException' with message 'array_merge(): Argument #1 is not an array' in D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php:783
Stack trace:
#0 [internal function]: think\Error::appError(2, 'array_merge(): ...', 'D:\\phpStudy1\\PH...', 783, Array)
#1 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php(783): array_merge('', Array)
#2 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\Model.php(2125): think\Model->toArray()
#3 [internal function]: think\Model->jsonSerialize()
#4 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\tpl\think_exception.tpl(393): json_encode(Object(app\common\model\ResourcesInfoModel), 128)
#5 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\exception\Handle.php(166): include('D:\\phpStudy1\\PH...')
#6 D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\exception\Handle.php(84): think\exception\Handle->convertExce

  1. <?php } else { ?>
  2. <caption><?php echo $label; ?></caption>
  3. <tbody>
  4. <?php foreach ((array) $value as $key => $val) { ?>
  5. <tr>
  6. <td><?php echo htmlentities($key); ?></td>
  7. <td>
  8. <?php
  9. if(is_array($val) || is_object($val)){
  10. echo htmlentities(json_encode($val, JSON_PRETTY_PRINT));
  11. } else if(is_bool($val)) {
  12. echo $val ? 'true' : 'false';
  13. } else if(is_scalar($val)) {
  14. echo htmlentities($val);
  15. } else {
  16. echo 'Resource';
  17. }
  18. ?>
  19. </td>

Call Stack

  1. in think_exception.tpl line 393
  2. at Error::appShutdown()

Environment Variables

GET Data

/index/Industry/projects_html
base_id
2
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
dichan.chungkong.cn
PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Administrator\AppData\Local\BypassRuntm
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.23 (Win32) OpenSSL/1.0.2j PHP/5.5.38
SERVER_NAME
dichan.chungkong.cn
SERVER_ADDR
172.16.8.96
SERVER_PORT
80
REMOTE_ADDR
44.199.225.221
DOCUMENT_ROOT
D:/phpStudy1/PHPTutorial/WWW/dichandichan/dichan/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
D:/phpStudy1/PHPTutorial/WWW/dichandichan/dichan/public
SERVER_ADMIN
admin@php.cn
SCRIPT_FILENAME
D:/phpStudy1/PHPTutorial/WWW/dichandichan/dichan/public/index.php
REMOTE_PORT
54742
REDIRECT_URL
/index/Industry/projects.html
REDIRECT_QUERY_STRING
/index/Industry/projects.html&base_id=2
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
/index/Industry/projects.html&base_id=2
REQUEST_URI
/index/Industry/projects.html?base_id=2
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711715373.864
REQUEST_TIME
1711715373
PATH_INFO
/index/Industry/projects.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\public/../application/
THINK_VERSION
5.0.10
THINK_START_TIME
1711715373.8645
THINK_START_MEM
151128
EXT
.php
DS
\
THINK_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\
LIB_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\
CORE_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\think\
TRAIT_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\thinkphp\library\traits\
ROOT_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\
EXTEND_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\extend\
VENDOR_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\vendor\
RUNTIME_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\runtime\
LOG_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\runtime\log\
CACHE_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\runtime\cache\
TEMP_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\runtime\temp\
CONF_PATH
D:\phpStudy1\PHPTutorial\WWW\dichandichan\dichan\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true