获取“未定义的偏移量”和“无效的参数”错误

时间:2019-07-20 05:28:30

标签: php php-7

我进入Reports.php页面时遇到以下错误:

  

遇到PHP错误
  严重性:通知
  消息:未定义的偏移量:0
  文件名:controllers / Reports.php
  行号:73
  回溯:
  文件:C:\ xampp \ htdocs \ restaurant \ application \ controllers \ Reports.php
  线:73
  函数:_error_handler
  文件:C:\ xampp \ htdocs \ restaurant \ index.php
  线:315
  功能:require_once

  

遇到PHP错误
  严重程度:警告
  消息:为foreach()提供了无效的参数
  文件名:controllers / Reports.php
  行号:88
  回溯:
  文件:C:\ xampp \ htdocs \ restaurant \ application \ controllers \ Reports.php
  线:88
  函数:_error_handler
  文件:C:\ xampp \ htdocs \ restaurant \ index.php
  线:315
  功能:require_once

这是Reports.php中的第73行:

$store_id = $store_data[0]['id'];

这是Reports.php中的第88行:

foreach ($order_data as $k => $v) {

这是index.php中的第315行:

require_once BASEPATH.'core/CodeIgniter.php';

0 个答案:

没有答案