使用未定义的常量I - 假设'我'在...在wamp服务器中 [英] Use of undefined constant I -assumed 'I' in.. In wamp server
本文介绍了使用未定义的常量I - 假设'我'在...在wamp服务器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的代码下面在apache服务器上运行良好,但是在wamp服务器中给出了ERROR ....
在第16行的chstat.php中使用未定义的常量i -assumed'i' br $> b $ b
请帮帮我解决问题..
我尝试过:
my code below working well in apache server but when in wamp server giving ERROR....
Use of Undefined constant i -assumed 'i' in chstat.php on line 16..
please help me out where I am worng..
What I have tried:
$chnos = 28;
include 'dbcon.php';
$sql = mysql_query("SELECT active FROM channel_des ;") or die("Query to show fields from table failed");
$chstatus = array();
while($row = mysql_fetch_array($sql)){
array_push($chstatus, $row['active']);
}
for($i=0; $i <= $chnos; $i++){
echo $chstatus[i];
}
推荐答案
chnos = 28;
包括'dbcon.php';
chnos = 28; include 'dbcon.php';
sql = mysql_query(SELECT active FROM channel_des;)或die(查询以显示表中的字段失败);
sql = mysql_query("SELECT active FROM channel_des ;") or die("Query to show fields from table failed");
chstatus = array();
while(
chstatus = array(); while(
这篇关于使用未定义的常量I - 假设'我'在...在wamp服务器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文