Code: Select all
<?php
$user = $_GET['user'];
$userfile = "users/" + $user + ".txt";
$fh = fopen($userFile, 'w+');
$numdiamonds = fread($fh, filesize($userFile));
$intdiamonds = (int)$numdiamonds;
$newdiamonds = $numdiamonds + 1;
fwrite($fh, $newdiamonds);
fclose($fh);
?>
Any ideas? I have a file called sn0re.txt in the /users/ folder, and it has the number 0 in it. Also, my website that this is on is located at http://diamonds.net78.net/