Reply to Re: [PHP] Re: incrementing a number from a text file

Your name:

Reply:


Posted by Blackwater Dev on 10/04/98 11:10

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 <eli.hen@gmail.com> 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 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 Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация