Re: question
| From: | Gabor Hojtsy | Date: | Sat, 18 Jan 2003 12:47:39 +0000 |
| Subject: | Re: question | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-15112@lists.php.net to get a copy of this message | ||
Please ask support questions from php-general@lists.php.net.
Hint: use join("", file(...)) or file_get_contents() if you have PHP 4.3.0...
Goba [one webmaster@php.net]
Nick wrote:
Hello, my name is Nick. I wont know, about function serialize and unserialize. I serialize more array, and save him in file (date.dat) When i loading serializing string from file(date.dat), php talk: Notice: unserialize() [function.unserialize]: Argument is not an string in o:\home\test1.ru\www\admin\test\reg.php on line 26 Or more. My testing cod is: _ _ _ _ _ _ _ _ _ _ _ _ _ <? if($QUERY_STRING == "") { include("m.htm"); } else { if($act=="add"){ $mass[]="<img src='img/TN_1024-amazon-flee.JPG'>"; $mass[]="img/1024-amazon-flee.JPG"; $mass[]="Абдула шариков<br>тёмная ночь<br>холст<br>120x30"; $st=serialize($mass); $f=fopen("st.dat","w+"); fseek($f,0); fputs($f,$st); } ############### if ($act == "view"){ //$f=fopen("st.dat","r"); //fseek($f,0); //$st=fgets($f,100); $st=file("st.dat"); $mass=Unserialize($st); echo $mass; } } ?> _ _ _ _ _ _ _ _ _ _ __ _ _ _ What`s is problem? Help me. nick@intramail.ru