V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
fxxkgw
V2EX  ›  PHP

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

  •  
  •   fxxkgw · Apr 10, 2015 · 2840 views
    This topic created in 4045 days ago, the information mentioned may be changed or developed.
    server端一个PHP脚本,接收客户端post过来的gzip压缩后的数据(字符串),PHP版本比较老,5.3.1
    因为是线上服务器,不方便升级,所以不能直接用gzdecode函数。
    请问如何将获取的数据解压出。
    才接触PHP没多久,请多多指教,谢谢。
    1 replies    2015-04-10 17:36:09 +08:00
    fising
        1
    fising  
       Apr 10, 2015
    http://php.net/manual/en/function.gzdecode.php

    User Contributed Notes 有现成的代码
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3424 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 12:14 · PVG 20:14 · LAX 05:14 · JFK 08:14
    ♥ Do have faith in what you're doing.