Notice: Undefined offset: 1 in

fkueyga6 fkueyga6 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
$kuangdu=‘10,2,30,3//50,30,10,20’;
$kuangdu=explode('//', $kuangdu);
$kuangdu_1=explode(',', $kuangdu[1]);//为什么这一行会提示Notice: Undefined offset: 1 in
$kuangdu_1_1=$kuangdu_1[1];//为什么这一行也会提示Notice: Undefined offset: 1 in
...全文

相关推荐

PHP提示Notice: Undefined variable的解决办法

今天在调试程序的时候,很多网上提供的源码都会出现 Undefined variable错误,一般情况下php是不需要定义变量的,但如果服务器什么都报错的,就会出现错误,所以服务器上都是应该屏蔽这种错误的

weixin_38707356

php Notice: Undefined index 错误提示解决方法

字面意思就是未定义的索引,一般情况下是因为程序开发作者判断不严谨导致。一般不会影响程序的运行,具体的解决方法可以参考下。

weixin_38650951

PHP运行出现Notice : Use of undefined constant 的完美解决方案分享

今天修改公司的网站,提示Notice : Use of undefined constant ,通过下面的方法解决了,最好是error_reporting(0);不需要更改配置

weixin_38621365

Notice: Undefined index: page in E:\PHP\test.php on line 14

治標不治本的就是將php.ini內的reporting部份修改,讓notice不顯示 error_reporting = E_ALL; display all errors, warnings and notices 改成 error_reporting = E_ERROR & ~E_NOTICE & ~E_WARNING 不然 isset($_GET[“page”])做個if-else判斷!! —-修正後原始碼如下—- if(isset($_GET[“page”]))$page=$_GET[“page”]; else $page=1; 您可能

weixin_38741759

PHP正则替换函数preg_replace()报错:Notice Use of undefined constant的解决方法分析

本文实例讲述了PHP正则替换函数preg_replace()报错:Notice Use of undefined constant的解决方法。分享给大家供大家参考,具体如下: 环境错误级别:error_reporting =E_ALL 某天我在研究一下php下的正则替换函数perg_replace(), 示例: 代码: $subject="2222a2222fff222222222A22222"; $pattern = "/(a)/e"; $replacement= "md5($1)";//$1,取匹配到的内存变量的值(\1也可以,只不过要注意双引号内的转义) echo pre

weixin_38562130
评论 10
收藏 已收藏
分享
返回顶部
fkueyga6
基础编程 21,889 成员 140,329 内容