Hi everybody,
I want to write to a given file using the code below. Somehow I get the
parse error. I thnk it has something to do with --- @Listing ----
Is this a setting in my php.ini which is wrong or is the code maybe wrong (I
copied it out of a php text book.)
Thanx
Wilbert
<body>
<?php
if (IsSet($submitted))
{
$fd = fopen($filename, "w+") or die("can't open the file $filename");
@Listing: $fout = fwrite($fd, $newstring);
@Listing: fclose($fd);
}
$fd = fopen($filename, "r") or die("can't open file $filename");
$initstring = fread($fd, filesize($filename));
fclose($fd);
echo "<FORM METHOD = 'POST' ACTION=\"$PHP_SELF\">";
echo "<INPUT TYPE = 'text' SIZE = 50 NAME = 'newstring' VALUE =
\"$initstring\">";
echo "<INPUT TYPE ='HIDDEN' NAME = 'submitted' VALUE = 1>";
echo "<INPUT TYPE = 'SUBMIT'>";
echo "</FORM>";
?>
</body>
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]