question
| From: | Nick | Date: | Fri, 17 Jan 2003 18:18:26 +0000 |
| Subject: | question | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-15101@lists.php.net to get a copy of this message | ||
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