V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
fxxkgw
V2EX  ›  PHP

请问 php 如何解析获取的被 gzip 压缩数据。

  •  
  •   fxxkgw · 2015-04-10 17:25:29 +08:00 · 2447 次点击
    这是一个创建于 3296 天前的主题,其中的信息可能已经有所发展或是发生改变。
    server端一个PHP脚本,接收客户端post过来的gzip压缩后的数据(字符串),PHP版本比较老,5.3.1
    因为是线上服务器,不方便升级,所以不能直接用gzdecode函数。
    请问如何将获取的数据解压出。
    才接触PHP没多久,请多多指教,谢谢。
    1 条回复    2015-04-10 17:36:09 +08:00
    fising
        1
    fising  
       2015-04-10 17:36:09 +08:00
    http://php.net/manual/en/function.gzdecode.php

    User Contributed Notes 有现成的代码
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2901 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:11 · PVG 23:11 · LAX 08:11 · JFK 11:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.