PHP compression command for Linux tuning

Source: Internet
Author: User

1. Split into 3 files, Lgq1.txt,lgq2,txt,lgq3.txt.

2. Execute the linux command with the PHP exec, the first parameter is the Linux command line, the second parameter
For the result array, which file is added successfully to the zip file, the third parameter: execution succeeds to 0.

3.

exec"zip./exl_file/wow.zip./exl_file/wow_1.txt./exl_file/wow_2.txt./exl_file/wow_3.txt", $outputs, $RC);if($RC! =0){foreach($outputs as$ko =$vo) {echo"$vo <br/>";}}Else{$zipfile='./exl_file/wow.zip';//Delete related files after file download and output}} 

PHP compression command for Linux tuning

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.