Home > PHP > Decomprimere file .gz

Decomprimere file .gz

function gzfile_get_contents($filename, $use_include_path = 0)
{
	//File does not exist
	if(!@file_exists($filename)) {
		return false;
	}

	//Read and imploding the array to produce a one line string
	$data = gzfile($filename, $use_include_path);
	$data = implode($data);
	return $data;
}
//scriviamo il risultato in un file
file_put_contents('punto.txt', gzfile_get_contents('punto.txt.gz'));
Categorie:PHP Tag:
  1. Nessun commento ancora...
  1. Nessun trackback ancora...
E' necessario che tu sia collegato per poter inserire un commento.