What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Tiny winy PHP question :P

Tiny winy PHP question :P
Author: Message:
ayjay
Senior Member
****

Avatar

Posts: 850
Reputation: 58
– / Male / Flag
Joined: Mar 2004
O.P. Tiny winy PHP question :P
Just a little test script to increase the number by 1 every time the page is refreshed and it works fine, but if you hold down F5 to refresh for quite a while, the number decreases and I can't work out why :/

code:
<?php

$filename = "count.txt";

$x = file_get_contents("$filename");
file_put_contents("$filename", $x);

$x = $x*1;
$y = $x+1;

$f = fopen($filename, "w");
fwrite($f, $y);
fclose($f);

echo $x;

?>

This post was edited on 03-19-2006 at 03:34 PM by ayjay.
03-19-2006 03:34 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Tiny winy PHP question :P - by ayjay on 03-19-2006 at 03:34 PM
RE: Tiny winy PHP question :P - by Josh Loughlin on 03-19-2006 at 03:52 PM
RE: Tiny winy PHP question :P - by absorbation on 03-19-2006 at 03:53 PM
RE: Tiny winy PHP question :P - by RaceProUK on 03-19-2006 at 04:02 PM
RE: Tiny winy PHP question :P - by J-Thread on 03-19-2006 at 04:07 PM
RE: Tiny winy PHP question :P - by ayjay on 03-19-2006 at 04:41 PM
RE: Tiny winy PHP question :P - by WDZ on 03-20-2006 at 05:18 AM
RE: Tiny winy PHP question :P - by ayjay on 03-20-2006 at 08:23 PM
RE: Tiny winy PHP question :P - by hmaster on 03-20-2006 at 09:00 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On