php-general | 2001062
Date: 06/29/01
- Next message: E K L: "RE: [PHP] Creating domain and default page"
- Previous message: Gyozo Papp: "Re: [PHP] Function"
- Next in thread: Don Read: "RE: [PHP] Adding 1 to a whole number"
- Reply: Don Read: "RE: [PHP] Adding 1 to a whole number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Way is this doing this Starting with 1000 all I what to do is increse
this number by one the first time I run it it adds 1 to the number 10001
second time it 10001002
Shouldn't it just add 1 to the number 1000,1001,1002,1003
<?
//$num ="1000";
$fp2=fopen ("number","r+")or die("unable to open file (number)");
$data = fgets($fp2, 1000);
$data1 = $data + "1";
fwrite($fp2,$data1);
echo $data1;
?>
Best regards,
Richard
mailto:rkurth <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: E K L: "RE: [PHP] Creating domain and default page"
- Previous message: Gyozo Papp: "Re: [PHP] Function"
- Next in thread: Don Read: "RE: [PHP] Adding 1 to a whole number"
- Reply: Don Read: "RE: [PHP] Adding 1 to a whole number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

