Hi,
At start test.txt contains a serialized array with value one and two.
a:2:{i:0;s:3:one;i:1;s:3:two;}
after one run this is:
a:3:{i:0;s:3:one;i:1;s:3:two;i:2;s:4:tree;}
But the last row prints nothing. Why?
Tnx,
Bas
?
$array=array();
$fp=fopen(test.txt,r);
flock($fp,1);
Hello,
OKay, when i replace the last rows with:
$fp=fopen(test.txt,r);
flock($fp,1);
$array=array_merge($array,unserialize(fread($fp,filesize(test.txt;
flock($fp,3);
fclose($fp);
it works.
But now i want to place this in a class, and it goes wrong again.
Hope you can help, thanks,
Bas
2 matches
Mail list logo