【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“push.php”一文,供大家参考学习
<?php
$chatfile="/tmp/cf";
if (($alias!="") and ($word!="")) {
$str="<font color=008000>".date("h:i:s");
$str=$str."</font> <font color=800000>[".$alias."]</font>说:<br> ";
$str=$str."-----".$
word;
$cmd="echo \"".$str."\" >> ".$chatfile;
if (!file_exists($chatfile))
exec("touch ".$chatfile);
exec($cmd);
}
?>
<html>
<body bgcolor=ffffff >
<form action=<? echo $
PHP_SELF; ?> method=post>
<table border=0 width=100%><tr>
<td align=right>别名:</td>
<td><input type=text name=alias size=8 value="<? echo $alias; ?>"></td>
<td align=right>发言:</td>
<td><input type=text name=word size=30 maxlength=500></td>
<td><div align=right><input type=submit value="送出"></td>
</tr></table>
</form>
</body>
</html>