Hurry up. Have you ever used the ZipArchive class? how can this problem be solved?

Source: Internet
Author: User
Hurry up... Have you ever used the ZipArchive class? I tested it locally and can compress the file. However, when the program is uploaded to the server, it cannot be compressed and no error is prompted. Thank you. Hurry up... ------ Solution ------------------ it is difficult for you to make judgments. it is best to provide code to check whether the server environment is consistent with the local environment? ------ Solution ---------------- hurry up... Have you ever used the ZipArchive class?
In my local test, files can be compressed, but files uploaded to the server cannot be compressed, and no error is prompted.
Thank you. Hurry up...

------ Solution --------------------
In this way, it is difficult for you to make judgments. it is best to provide code to check whether the server environment is consistent with the local environment?
------ Solution --------------------
1: the server does not display the error because the error display is disabled. open the method-> php. ini-> display_errors = ON,
If the server does not display a Notice-level error, set error_reporting = E_ALL &~ E_NOTICE;

2: The server cannot compress files normally. check whether the server has enabled the zip extension,
If it is not enabled, the ZipArchive method will not work.
View method: Create a php file on the server and output phpinfo ();
PHP code
  

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.