You are here: Re: Save PHP variables to a text file « PHP Programming Language « IT news, forums, messages
Re: Save PHP variables to a text file

Posted by Captain Paralytic on 10/01/07 11:41

On 1 Oct, 12:08, Bruno Barros <rage...@gmail.com> wrote:
> > > I was wondering how to save PHP variables to a txt file and then
> > > retrieve them again.
>
> This is obviously serialize, as it's the easiest way of doing this
> work:
>
> $stuff_to_store = serialize($myvariable);
>
> $handle = fopen('file.txt','w+');
> fwrite($handle, $stuff_to_store);
>
> ---
>
> $stuff_i_stored = unserialize(file_get_contents('file.txt'));
>
> ;)

Could var_export do something similar?

 

Navigation:

[Reply to this 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

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