Posted by Bruno Barros on 10/01/07 11:08
> > 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')); ;)
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming