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