php explode 问题
<?php/*Task3:Putyourcodehere*/$mingdan=file("mingdan.txt");$zhuanye="EECS";$meihang=e...
<?php
/* Task 3: Put your code here */
$mingdan = file("mingdan.txt");
$zhuanye="EECS";
$meihang = explode ("\n",$mingdan);
$count=count($meihang);
/*print_r ($meihang[0]);*/
for ($i=0;$i<$count;$i++)
{
print "<p>";
print_r "$meihang[i]";
print "</p>";
}
?>
</div>
运行出错 提示Warning: explode() expects parameter 2 to be string, array given in on line 71
71 行是 $meihang = explode ("\n",$mingdan); 展开
/* Task 3: Put your code here */
$mingdan = file("mingdan.txt");
$zhuanye="EECS";
$meihang = explode ("\n",$mingdan);
$count=count($meihang);
/*print_r ($meihang[0]);*/
for ($i=0;$i<$count;$i++)
{
print "<p>";
print_r "$meihang[i]";
print "</p>";
}
?>
</div>
运行出错 提示Warning: explode() expects parameter 2 to be string, array given in on line 71
71 行是 $meihang = explode ("\n",$mingdan); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询