Warning: Invalid argument supplied for foreach 怎么解决
Warning:Invalidargumentsuppliedforforeach怎么解决Warning:Invalidargumentsuppliedforforeac...
Warning: Invalid argument supplied for foreach 怎么解决
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 60
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 83
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 106
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
问吧,在用好好的突然出现这个错误,不知道是什么问题,请各位网络高手指点一下子,希望早一点解决问题谢谢
现在登陆前台,和前台退出都出现找不到网页现象, 展开
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 60
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 83
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/question.php on line 106
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
Warning: Invalid argument supplied for foreach() in /var/web/wdj/new-hichuzhou/webapp/wenba/include/tag.func.php on line 118
问吧,在用好好的突然出现这个错误,不知道是什么问题,请各位网络高手指点一下子,希望早一点解决问题谢谢
现在登陆前台,和前台退出都出现找不到网页现象, 展开
2个回答
展开全部
Warning: Invalid argument supplied for foreach()
问题Warning: Invalid argument supplied for foreach() in 完善解决方案
将报错的语句做如下修改(例):
把
QUOTE:
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
改为
QUOTE:
if(is_array($extcredits)) //add
{
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
} //add
或
QUOTE:
foreach((array)$extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
造成这个错误的原因多数是因为论坛升级、编码转换造成的!
如果对PHP熟悉的人,可以直接找到出错的地方,分析出错信息是对哪个数据库表操作时造成的(一般都是论坛的基本数据表),然后,找到相应表的原版数据导进去,问题可解决。
如果对PHP不熟悉的人,可以按出错信息提示的位置,用2楼的修改方法进行修改,问题可解决。
问题Warning: Invalid argument supplied for foreach() in 完善解决方案
将报错的语句做如下修改(例):
把
QUOTE:
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
改为
QUOTE:
if(is_array($extcredits)) //add
{
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
} //add
或
QUOTE:
foreach((array)$extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
造成这个错误的原因多数是因为论坛升级、编码转换造成的!
如果对PHP熟悉的人,可以直接找到出错的地方,分析出错信息是对哪个数据库表操作时造成的(一般都是论坛的基本数据表),然后,找到相应表的原版数据导进去,问题可解决。
如果对PHP不熟悉的人,可以按出错信息提示的位置,用2楼的修改方法进行修改,问题可解决。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
轮回了不是数组的的变量你是不是caches文件夹木有写权限
查看原帖>>
查看原帖>>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询