file_put_contents is only for PHP5 so if you are using PHP4, this won't work.
On Thu, 10 Mar 2005 04:26:41 +0200, Eli <[EMAIL PROTECTED]> wrote:
> 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 kno
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);
--
PHP General Ma
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.
>
> Thanks,
>
>
> Ross
Not 100% sure what the most economical way is going to be, but
3 matches
Mail list logo