接上面这是我的第2个页面result.php
原代码是<html>
<head>
<style type="text/css">
<!--
.{ font-family: "宋体"; font-size: 9pt;color:#000000}
-->
</style>
<body bgcolor=#cccccc>
<?
if ($nickname=="") {
print "<center><b><font color=#FF99FF>您的大名?</font><br>";
}
else if ($email=="") {
print "<center><b><font color=#FF99FF>您电子邮件?</font><br>";
}
else if ($note=="") {
print "<center><b><font color=#FF99FF>您没有要说的吗?</font><br>";
}else{
print "<p></p>";
$t = date(Y年m月d日);
$note = str_replace ( "<", "<", $note);
$note = str_replace ( ">", ">", $note);
$note = str_replace ( "\n", "<br>", $note); $main = "网上大名:<a href=\"mailto:$email\">$nickname</a>:($t)<br>留言: $note <br><hr>";
$f = fopen("note.txt","a");
fwrite($f,$main);
fclose($f);
print "<center><b><font color=#FF99FF>谢谢您的留言!</font><br>";
}
?><p><br></p>
<p><br></p>
<center><a href="note.php">返回</a></center>
<p><br></p>
<p align=right><font style=" color=color:#cccccc;font-size:12pt">作者:<a href="mailto:[email protected]">sunny</a><br>
主页:<a href="http://jingying.40it.com">精英网</a></font>
</center>
</body>
</html>
原代码是<html>
<head>
<style type="text/css">
<!--
.{ font-family: "宋体"; font-size: 9pt;color:#000000}
-->
</style>
<body bgcolor=#cccccc>
<?
if ($nickname=="") {
print "<center><b><font color=#FF99FF>您的大名?</font><br>";
}
else if ($email=="") {
print "<center><b><font color=#FF99FF>您电子邮件?</font><br>";
}
else if ($note=="") {
print "<center><b><font color=#FF99FF>您没有要说的吗?</font><br>";
}else{
print "<p></p>";
$t = date(Y年m月d日);
$note = str_replace ( "<", "<", $note);
$note = str_replace ( ">", ">", $note);
$note = str_replace ( "\n", "<br>", $note); $main = "网上大名:<a href=\"mailto:$email\">$nickname</a>:($t)<br>留言: $note <br><hr>";
$f = fopen("note.txt","a");
fwrite($f,$main);
fclose($f);
print "<center><b><font color=#FF99FF>谢谢您的留言!</font><br>";
}
?><p><br></p>
<p><br></p>
<center><a href="note.php">返回</a></center>
<p><br></p>
<p align=right><font style=" color=color:#cccccc;font-size:12pt">作者:<a href="mailto:[email protected]">sunny</a><br>
主页:<a href="http://jingying.40it.com">精英网</a></font>
</center>
</body>
</html>
解决方案 »
- 【紧急求助】php无法把二进制文件传进mysql!!!!
- zendframework $this->view->baseUrl = $this->_request->getBaseUrl();
- 大家看看,为什么得不到值呢?
- php preg_replace函数正则替换问题!望高手授业解惑~~小妹感激不尽
- 如何让FCK的编辑器加快 速度太麻痹了
- 表单中数组定义的方法??
- 看看我写的语句有问题吗?
- 已查出mysql中的图片数据,怎么让它们滚动?
- 怎么才能把数组中的一个元素替换成另外一个?还有,怎么取得数组的下标?
- 哪里有php的中文教程?
- 请问这个SQL语句怎么写?
- 如何获得一图片的大小?长度,宽度?
2,运用update table set x='$x',y='$y'......;
3.函数
function viewerip()
{
$viewerip=getenv("http_x_forwarded_for");
$gateip=getenv("remote_addr");
if(!$viewerip)
$viewerip=$gateip;
return $viewerip;
}