Reply to Re: serialize() and unserialize()

Your name:

Reply:


Posted by Toby Inkster on 12/20/06 09:15

powellgg wrote:

> .Net has no corresponding method for unserialize() and I can't find
> where the page/site does the initial serialization. Is there an
> underlying serialization when it is creating the cookie? If the first
> line is setting a null value to the cookie, why would the second line
> try to read it? It's going to be the same every time... right?

serialize() converts from a nested array structure to a string.
unserialize() converts back the other way. This provides a convenient
method of storing a nested array structure into a file, database or
cookie.

These functions are very PHP-specific, though some people have written
functions to deal with PHP-style serialization in other languages. Of
interest to you might be:

http://csphpserial.sf.net/

In general though, I tend to recommend *against* rewriting code just
because it's in a language you don't know. You may have a very good
reason to be rewriting this website, but do consider whether a full
rewrite is the best solution, or whether it might be better to learn
some PHP and maintain the website that way. It's always a good idea
to expand ones repetoire of skills.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

[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

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