About the compression of a related problem, ziparchive in PHP5.2 and PHP5.3 usage is not the same

Source: Internet
Author: User
Tags ziparchive
A question about compression, ziparchive in PHP5.2 and PHP5.3 usage?
This post was last edited by Bxline on 2013-02-09 19:26:18

The following code I use apache+ php5.2 native debugging is to generate a aa.zip is correct
But to the server, the server is PHP5.3 run the following code result to generate 2 files (one is aa.zip.a04780, the other is aa.zip.b04780, these 2 files. Instead of just generating aa.zip a file), 2 Zip files are followed by a numeric number, for what reason.
The server is win03+fastcgi+php5.3.

Here's the code,
$zip = new Ziparchive ();

if ($zip->open (' D:/aa.zip ', ziparchive::create)!== TRUE) {
Die ("Could not open Archive");
}
$zip->addfile ("D:/bb.txt", basename ("Bb.txt"));
$zip->close ();
echo "Archive created successfully.";
?>


------Solution--------------------
Tested, didn't find the problem you said

  • 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.