note 17769 added to function.fopen
| From: | acid at subspace dot net | Date: | Sat, 22 Dec 2001 18:55:42 +0000 |
| Subject: | note 17769 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23799@lists.php.net to get a copy of this message | ||
Go to http://www.subspacehq.com/assassination/admin/news.php
and try to post news. Then go to http://www.subspacehq.com/assassination/admin/news.txt
and look if newst message goes up. Here is code, whats wrong??? contact to me by e-mail.
<html>
<head>
<title>SSCX Assassination - Subspace / Continuum</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!--
Assassination.Net
Copyright © 2001 SSCX Assassination
All Rights Reserved ® 2001
Acid Tank - Acid@Subspace.Net
-->
<STYLE TYPE="text/css">
<!--
a:link { text-decoration: underline; color: #000000; }
a:active { text-decoration: underline; color: #000000; }
a:visited { text-decoration: underline; color: #000000; }
a:hover { text-decoration: underline; color: #000000; }
-->
</STYLE>
<table width="400" cellspacing="0" cellpadding="0"
border="0">
<tr>
<td colspan="2"><img src="http://www.subspacehq.com/assassination/images/gamespec.gif"
border="0"></td>
</tr>
<tr>
<td>
<font face="Verdana" size="1">
<br><br>
<?php
if(!empty($valmis))
{
$today = date("d/m/Y");
$addnews = fopen("news.txt", "r+") or print("Error!");
fwrite($addnews, "\n <b>$subject</b><br>$today | <a href=\"mailto:$email\">$username</a><br><hr>$news<br><br><br>");
fclose($addnews);
print("The news has been built from the database.<br>Go back to <a
href=\"javascript: history.go(-2)\">admin center</a> site.");
}
else
{
?>
<form action="news.php" method="post">
Username:<br>
<input style="FONT-SIZE: 10px; FONT-FAMILY: Verdana" name="username"
type="text"><br>
E-Mail Address:<br>
<input style="FONT-SIZE: 10px; FONT-FAMILY: Verdana" name="email"
type="text"><br>
Subject:<br>
<input style="FONT-SIZE: 10px; FONT-FAMILY: Verdana" name="subject"
type="text"><br>
Article:<br>
<textarea style="FONT-SIZE: 10px; FONT-FAMILY: Verdana" name="news"
rows="10" cols="50">
</textarea><br>
<input style="FONT-SIZE: 10px; FONT-FAMILY: Verdana" name="valmis"
type="submit" value="Send!">
</form>
<?php
}
?>
</font>
</td>
</tr>
</table>
</body>
</html>
--
http://www.php.net/manual/en/function.fopen.php
http://master.php.net/manage/user-notes.php?action=edit+17769
http://master.php.net/manage/user-notes.php?action=delete+17769
http://master.php.net/manage/user-notes.php?action=reject+17769