时空行者

  1. 首页
  2. PHP
  3. 正文

序列化长度问题

2024年1月31日 637点热度
function common_unserialize($str) {
    if(empty($str)){
        return '';
    }
    $str= preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $str );
    $str= str_replace("\r", "", $str);
    return unserialize($str);
}
标签: 暂无
最后更新:2024年1月31日

peakswill

这个人很懒,什么都没留下

点赞
下一篇 >

COPYRIGHT © 2025 时空行者. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

皖ICP备16014035号-3