You are here: Re: Serialize string contains line feed? « PHP Programming Language « IT news, forums, messages
Re: Serialize string contains line feed?

Posted by Oli Filth on 09/24/06 16:38

howachen@gmail.com said the following on 24/09/2006 16:52:
> Oli Filth wrote:
>> howachen@gmail.com said the following on 22/09/2006 19:27:
>>> Consider the following program, how to make it work properly when a
>>> string contains line-feed?
>>>
>>> <?php
>>>
>>> $temp = "this is a \ntest";
>>>
>>> print serialize($temp);
>>>
>>> ?>
>> What do you mean by "work properly"?
>>
> pls ignore the above example,
>
> use the following one:
>
> $temp = array( "this is a \ntest\";1", "sdsdssd") ;
>
> print_r ( ( serialize($temp) ); // error here
>
> how to make the code `safe` for any input?

The error is due to the mismatched parentheses (you've opened 3, but
only closed 2).


P.S. It is customary to not top-post in this newsgroup. :)


--
Oli

 

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

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