一个关天聊天室的问题! 用session阿,登陆之后就给他一个session 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 echo $_SESSION['username']."说道:".$msg; <html><head><title>聊天室</title></head><body bgcolor="#009900" topaling=0><table border=0><form action="input.php" method="post"><tr> <td bgcolor="#FFFF99" width="565" height="1"> <spacer type="block" height="1"></td> </tr> <tr> <td> 大名:<font color=blue> <?php echo $_SESSION['username']; ?></font> </td> </tr> <tr> <td> <input type="hidden" name="name" value="<? echo $_SESSION['username'];?>"> 内容:<input type="text" name="message" size=55> <input type="submit" value="确定"> </form> </td> </tr> </table> <?php $msg=$_POST['message']; $write_file="1.txt"; if($msg!="") { //$name0=$_POST['username']; $fp=fopen($write_file,"a+"); $fw=fwrite($fp,$_SESSION[username]."说道:".$msg); fclose($fp); } ?></body></html>楼上兄弟的话,我试了一下,还是不行的,上面是处理发言的程序,希望高手帮我改一下,在此谢谢了!我的思想是把发言的话先写到文本中,最后再读出来,但现在的问题就是显示不出来注册时发言人的名字: 这个插件如何使多个复选框输出的值都有连接 我写了个类,但是在function 里用不了 mysql存储产品图片采用哪种方法 php接受浏览器语言的设置 mysql4+php5+windowsxp+apache+tomcat配置缺少mod_jk2-2.0.43.dll PHP如何执行sql server的存储过程并得到结果 怎样在页面间传递变量? 偶是初学者,各位老大请指教!!! 我X iampat(我是PAT) 你也太过份了吧~~ JSON 中文UNICODE编码问题,请指点 php 中如何得到mssql存储过程得返回值?查了资料,没找到答案. bbs上发的大家图片怎么管理的?
<head><title>聊天室</title>
</head><body bgcolor="#009900" topaling=0><table border=0>
<form action="input.php" method="post">
<tr>
<td bgcolor="#FFFF99" width="565" height="1">
<spacer type="block" height="1"></td>
</tr>
<tr>
<td>
大名:<font color=blue>
<?php
echo $_SESSION['username'];
?></font>
</td>
</tr>
<tr>
<td>
<input type="hidden" name="name" value="<? echo $_SESSION['username'];?>">
内容:<input type="text" name="message" size=55>
<input type="submit" value="确定">
</form>
</td>
</tr>
</table>
<?php
$msg=$_POST['message'];
$write_file="1.txt";
if($msg!="")
{ //$name0=$_POST['username'];
$fp=fopen($write_file,"a+");
$fw=fwrite($fp,$_SESSION[username]."说道:".$msg);
fclose($fp);
}
?></body>
</html>
楼上兄弟的话,我试了一下,还是不行的,上面是处理发言的程序,希望高手帮我改一下,在此谢谢了!
我的思想是把发言的话先写到文本中,最后再读出来,但
现在的问题就是显示不出来注册时发言人的名字: