Hmm..noone has any ideas on this one? Its really driving me crazy
- John Vanderbeck
- Admin, GameDesign
----- Original Message -----
From: "John Vanderbeck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 10:01 PM
Subject: [PHP] fscanf problem
> my code...
>
> WRITE TO FILE:
> if ($item_file = fopen("$thisdir/item.dat", "w"))
> {
> fwrite($item_file, "$new_item\n$asin\n$description\namazon");
> fclose($item_file);
> echo "<P CLASS=Normal>$new_item created</P>";
> }
>
> READ FROM FILE:
> $item_file = fopen("$thisdir/item.dat", "r");
> fscanf($item_file, "%s\n%s\n%s\n%s", $display, $asin, $description,
> $link);
> fclose($item_file);
>
> PROBLEM:
> $display comes out correct, but $asin, $descrition and $link are always
> empty
>
> SAMPLE FILE:
> MyItem
> 11517
> ThisIsMyDecriptionWithoutSpaces
> amazon
>
> - John Vanderbeck
> - Admin, GameDesign
>
>
> --
> 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]
>
>
--
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]