Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (file_exists('apple_count.txt'))
- {
- $fil = fopen('apple_count.txt', r);
- $dat = fread($fil, filesize('apple_count.txt'));
- fclose($fil);
- $fil = fopen('apple_count.txt', w);
- fwrite($fil, $dat+1);
- }
- else
- {
- $fil = fopen('apple_count.txt', w);
- fwrite($fil, 1);
- fclose($fil);
- }
Add Comment
Please, Sign In to add comment