Home > php教程 > php手册 > php next()在服务器上和本地效果不同为什么php.ini可以控制么

php next()在服务器上和本地效果不同为什么php.ini可以控制么

WBOY
Release: 2016-06-06 19:40:43
Original
1774 people have browsed it

我把我的程序上传到空间报错了找到原因后发现next()方法好像总是先执行一次似地 foreach ($crs as $k= $value) { $xiang =""; echo key($crs)."br"; if(key($crs)=="name"){ $xiang = 13; }if(key($crs)=="zhiwu"){ $xiang = 14; }if(key($crs)=="tel"){ $xi

我把我的程序上传到空间报错了找到原因后发现next()方法好像总是先执行一次似地 foreach ($crs as $k=> $value) {
$xiang ="";
echo key($crs)."
";
if(key($crs)=="name"){
$xiang = 13;
}if(key($crs)=="zhiwu"){
$xiang = 14;
}if(key($crs)=="tel"){
$xiang = 15;
}if(key($crs)=="email"){
$xiang = 16;
}if(key($crs)=="password"){
$xiang = 17;
}
next($crs);
$lsjl->addlsjl($kuai,$xiang,json_encode($yrs),json_encode($xrs));
}

数据crs =Array ( [name] => 312333 [zhiwu] => 123333 [tel] => 121343333 [email] => 121343333 )

打印出的结果是

服务器

zhiwu
tel
email

本地输出结果

name
zhiwu
tel
email

求帮助

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template