在php中序列化和反序列化的问题?

时间:2013-09-30 14:08:39

标签: php codeigniter

我想序列化以下数组

Array
    (
        [0] => ./assets/user_1/images/15_3_1_5__69689_zoom.jpg
        [1] => ./assets/user_1/images/15_3_1_5__69689_zoom.jpg
        [2] => ./assets/user_1/images/15_adriano.jpg
        [3] => ./assets/user_1/images/20_index.jpg
        [4] => ./assets/user_1/images/20_index.jpg
        [5] => ./assets/user_1/images/20_mag.jpg
        [6] => ./assets/user_1/images/20_images.jpg
        [7] => ./assets/user_1/images/20_images.jpg
    )

Serialize String是:

a:9:{i:0;s:47:"./assets/user_1/images/15_3_1_5__69689_zoom.jpg";i:1;s:47:"./assets/user_1/images/15_3_1_5__69689_zoom.jpg";i:2;s:37:"./assets/user_1/images/15_adriano.jpg";i:3;s:37:"./assets/user_1/images/20_contact.jpg";i:4;s:38:"./assets/user_1/images/20_About_Us.png";i:5;s:36:"./assets/user_1/images/20_photos.jpg";i:6;s:35:"./assets/user_1/images/20_index.jpg";i:7;s:33:"./assets/user_1/images/20_mag.jpg";i:8;s:36:"./assets/user_1/images/20_images.jpg";}

当我想要反序列化它的错误时给我

  

unserialize():偏移量为9的300字节错误

请帮帮我

0 个答案:

没有答案