@Listing - causing pasre error

From: Date: Tue, 10 Apr 2001 13:53:34 +0000
Subject: @Listing - causing pasre error
Groups: php.general 
Request: Send a blank email to php-general+get-48028@lists.php.net to get a copy of this message
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 info@pdd.nl -------------------------

« previous php.general (#48028) next »