2013-07-26 3 views
-2

어떻게 내가 zip 디렉토리를 만들고 it.is 파일을 만들 수 있지만 시도 할 수 있지만 어떻게 지퍼 수 있지만 디렉터리를 만들고 그것에 새 파일을 만들 수 있습니다.파일을 생성하고 압축하는 방법

코드 : 사전에

$directoryPath = "../word_plugin/".mobilesplash_. time(). _ .$c_id. _plugin; 
mkdir($directoryPath); 

$myFile = "$directoryPath/testFile.php"; 
$fh = fopen($myFile, 'w') or die("can't open file"); 
$stringData = "Yoo"; 
fwrite($fh, $stringData); 
$stringData = "Hello"; 
fwrite($fh, $stringData); 
fclose($fh); 

고맙습니다.

+0

당신도 PHP와 zip 파일을 만드는 방법에 대한 기본 검색을 시도하지 않은 나타납니다. 이 질문은 아무런 연구 노력도 보이지 않는다. – Anigel

+0

PHP ZipArchive가 자습서가되어야한다. – Fredd

+0

이 질문은 대답이 [manual] (http://us2.php.net/zip). – vascowhite

답변

관련 문제