Jump to content

[SOLVED] GZIP a CSV file with php


Asheeown

Recommended Posts

If you're using unix, you may want to call the external gzip command

 

exec("gzip $file");

 

If that's available, it's by far the easiest way.  The compressed file will be named "$file.gz".  Make sure that you validate $file if it comes from data sent by the user, otherwise they can easily hack your site.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.