Posted by Eli on 10/03/01 11:10
Ross Hulford wrote:
> I want to read a number from an external (txt) file and increment it.then
> save the number back on the text file.
> I know this is possible but want a simple amd economical way to do this.
Try:
file_put_contents("file.txt",((int)file_get_contents("file.txt"))+1);
[Back to original message]
|