PHP:反序列化字符串

时间:2017-03-27 05:20:25

标签: javascript php arrays

这是我的数据库

enter image description here

输入:

a:3:{i:0;s:28:"Logo_final_SatuPintu (1).png";i:1;s:24:"Logo_final_SatuPintu.png";i:2;s:44:"WhatsApp Image 2017-03-24 at 7.04.01 PM.jpeg";}

它的动态输入类型文件的序列化。现在我想拍摄那张照片。请帮帮我..谢谢

1 个答案:

答案 0 :(得分:0)

PHP documentation for unserialize

PHP code demo

<?php
$result=unserialize('a:3:{i:0;s:28:"Logo_final_SatuPintu (1).png";i:1;s:24:"Logo_final_SatuPintu.png";i:2;s:44:"WhatsApp Image 2017-03-24 at 7.04.01 PM.jpeg";}');
print_r($result);

<强>输出:

Array
(
    [0] => Logo_final_SatuPintu (1).png
    [1] => Logo_final_SatuPintu.png
    [2] => WhatsApp Image 2017-03-24 at 7.04.01 PM.jpeg
)