PHP decompression functions gzdecode and gzinflate usage

Source: Internet
Author: User
PHP decompression functions gzdecode and gzinflate use methods PHP decompression functions gzdecode and gzinflate use method Technology

Maybe yes, published on

How to use the gzdecode function added after PHP 5.4, gzdecode? Decodes a gzip compressed string, decompress a string compressed with gzip, which is written in the manual on the official website.

Currently, the PHP version of many space service providers has not reached 5.4, which also leads to an undefined function error after using this function. how can this problem be solved? Some of the logs submitted by users on the PHP official website provide a good solution. use the gzinflate function instead. the code is as follows:

 

The function of gzinflate is similar to that of gzdecode, in The annotation of the returned value, the official prompt "the function will return an error if the uncompressed data is more than 32768 times The length of the compressed input data or more than the optional parameter length. ".

Grade (84) evaluation (0) View Comments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.