duanbei6427 2018-10-13 21:30
浏览 12

PHP注意:什么是亲[重复]

I've been getting this error. Any fix??

PHP Notice: Undefined offset: 1 in line 402

if ($argv[1] == '--cover')
{
    $Modules = new Modules;
    $Modules->cover();
    die();
}

The line is if ($argv[1] == '--cover')

</div>
  • 写回答

2条回答 默认 最新

  • duanbanzhi4419 2018-10-13 21:39
    关注

    This error means that the $argv[1] is undefined or null. Make sure this variable is properly assign or have a value before making a condition.

    using print_r($argv); before making a condition will help you if the variable have a value or not.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题