快疯了,问个比较麻烦的问题!! 靠。。我 对csdn的php区彻底失望了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 程序太长,没仔细看。就说一个注意点:header和echo一起用的时候会有点问题:在echo后面的header都没有效果。 172行$fp=fopen("D:/yellow.txt","a");你的打开方式是a写入方式打开,将文件指针指向文件末尾。如果文件不存在则尝试创建之。两个1234是不是追加的结果?改成$fp=fopen("D:/yellow.txt","w");试试。另有一问:1234是啥?文件内容? <tr> <td bgcolor="#73A2D6" class="blue9"> <img src="images/p.gif" width="23" height="23" align="absmiddle"> <span class="white9"> 系统提示 </span> </td></tr> 这段前加exit就执行一次 , 在后面加exit就2次了 , 所以判断这个问题! 可是html会有什么问题。我现在就想知道一般都什么情况会让程序从头到尾重新执行一次 不是 1234 是4次写入的数字,在代码各个段落做标记用的,然后用exit看那段没有执行,那段重复执行 把所有的$fp=fopen("D:/yellow.txt","a"); 改成$fp=fopen("D:/yellow.txt","w"); 可读性相当的差,注意缩进……各种注释风格都样,C的,C++的,HTML的…… 可以用zend缩进一下如果你认为可读性差的话,这程序都快改烂了 到处插入echo,查看变量结果,慢慢调试吧。不给你看了,烦死了。程序里总共才一个循环,怎么可能执行两遍。肯定是你犯低级错误了。自己找吧 问题在<? if ($v!=22) { ?>下边,貌似下面的几行代码让页面刷新了,所以重复执行了一遍,各位帮忙看下 <? if ($v!=22) { ?><table width="100%" border="0" cellspacing="0" cellpadding="0" class="header"> <tr> <td><img src="../search/images/sys1.gif" width="96" height="36" border="0"></td> <td width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="images/b.jpg" height="36" colspan="2"></td> </tr> </table> </td> </tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#73A2D6" class="blue9"><img src="images/p.gif" width="23" height="23" align="absmiddle"><span class="white9">系统提示</span></td> </tr> <tr> <td valign="top"> </td> </tr></table><? } else { ?><table width="100%" border="0" cellspacing="0" cellpadding="0" class="header"> <tr> <td valign="bottom"><a href="consume.php"><img src="images/consume.gif" height="36" border="0"></a></td> <td><a href="payment.php"><img src="images/payment1.gif" height="36" border="0"></a></td> <td valign="bottom"><a href="account.php"><img src="images/account.gif" height="36" border="0"></a></td> <td valign="bottom"><a href="pay.php"><img src="images/c_pay.gif" height="36" border="0"></a></td> <td valign="bottom"><a href="tts.php"><img src="images/tts1.gif" height="36" border="0"></a></td> <td valign="bottom"><a href="packages.php"><img src="images/package.gif" height="36" border="0"></a></td> <td valign="bottom"></td><td width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="images/b.jpg" height="36" colspan="3"></td> </tr> </table> </td> </tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#73A2D6" class="blue9"><img src="images/p.gif" width="23" height="23" align="absmiddle"><span class="white9">企业充值记录</span></td> </tr> <tr> <td valign="top"> </td> </tr></table><? } ?><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td class="blue9" align="center"><?=$msg?></td> </tr></table><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100%" align="center" valign="bottom" class="red9"> <br> <a href="<?=$url?>"><img src="../search/images/return.jpg" border="0"></a> <a href="welcome.php"><img src="../search/images/main.jpg" border="0"></a> </td> </tr></table><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100%" align="center" valign="bottom" class="red9"> </td> </tr></table><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100%" align="center" valign="bottom" class="red9"> <br> </td> </tr></table> 晕 那帮我看看上边的html会不会使页面刷新 结构很简单 if()else 为什么不 debug 一遍呢? php如何做一个循环随机生成不重复的数字的? 请教一下:这个正则表达式怎么写? 诚聘网站PHP工程师,主要为网站B/S系统程序开发 查询问题 如何让我的计数器具有防刷新的功能??? PHP5和APACHE204出来了!!! 还是session的问题,高分相赠,在线等待。 ASP2PHP如何使用?请高手告知! 用ThinkPHP 开发b2b电子商务网站好还是哪种框架或模板引擎好? 大神救救命啊 smarty求助 变量传到模板里没有值?
在echo后面的header都没有效果。
$fp=fopen("D:/yellow.txt","a");
你的打开方式是a
写入方式打开,将文件指针指向文件末尾。如果文件不存在则尝试创建之。
两个1234是不是追加的结果?
改成
$fp=fopen("D:/yellow.txt","w");
试试。
另有一问:1234是啥?文件内容?
<img src="images/p.gif" width="23" height="23" align="absmiddle">
<span class="white9"> 系统提示 </span>
</td></tr> 这段前加exit就执行一次 , 在后面加exit就2次了 , 所以判断这个问题! 可是html会有什么问题。
我现在就想知道一般都什么情况会让程序从头到尾重新执行一次
$fp=fopen("D:/yellow.txt","a");
改成
$fp=fopen("D:/yellow.txt","w");
各种注释风格都样,C的,C++的,HTML的……
不给你看了,烦死了。
程序里总共才一个循环,怎么可能执行两遍。肯定是你犯低级错误了。
自己找吧
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="header">
<tr>
<td><img src="../search/images/sys1.gif" width="96" height="36" border="0"></td>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/b.jpg" height="36" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#73A2D6" class="blue9"><img src="images/p.gif" width="23" height="23" align="absmiddle"><span class="white9">系统提示</span></td>
</tr>
<tr>
<td valign="top">
</td>
</tr>
</table>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="header">
<tr>
<td valign="bottom"><a href="consume.php"><img src="images/consume.gif" height="36" border="0"></a></td>
<td><a href="payment.php"><img src="images/payment1.gif" height="36" border="0"></a></td>
<td valign="bottom"><a href="account.php"><img src="images/account.gif" height="36" border="0"></a></td>
<td valign="bottom"><a href="pay.php"><img src="images/c_pay.gif" height="36" border="0"></a></td>
<td valign="bottom"><a href="tts.php"><img src="images/tts1.gif" height="36" border="0"></a></td>
<td valign="bottom"><a href="packages.php"><img src="images/package.gif" height="36" border="0"></a></td>
<td valign="bottom"></td>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/b.jpg" height="36" colspan="3"></td>
</tr>
</table>
</td>
</tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#73A2D6" class="blue9"><img src="images/p.gif" width="23" height="23" align="absmiddle"><span class="white9">企业充值记录</span></td>
</tr>
<tr>
<td valign="top">
</td>
</tr>
</table>
<? } ?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td class="blue9" align="center"><?=$msg?></td>
</tr>
</table><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" valign="bottom" class="red9">
<br>
<a href="<?=$url?>"><img src="../search/images/return.jpg" border="0"></a>
<a href="welcome.php"><img src="../search/images/main.jpg" border="0"></a>
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" valign="bottom" class="red9">
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="center" valign="bottom" class="red9">
<br>
</td>
</tr>
</table>