fail
11-05-2010, 01:02 PM
I have this fopen() script that ran fine on Windows, but now on Linux it give me a "Permission denied" error.
The data.zip file does not exist and should be created with fopen()
Any ideas?
$fp = fopen('data.zip', 'w'); // << error is on this line
fwrite($fp, $inhalt);
fclose($fp);
$zip = new ZipArchive;
$res = $zip->open('data.zip');
if ($res === TRUE) {
$path = getcwd() . "/test/";
$path = str_replace("\\","/",$path);
mkdir($path, 0777);
$zip->extractTo($path);
$zip->close(); }
The data.zip file does not exist and should be created with fopen()
Any ideas?
$fp = fopen('data.zip', 'w'); // << error is on this line
fwrite($fp, $inhalt);
fclose($fp);
$zip = new ZipArchive;
$res = $zip->open('data.zip');
if ($res === TRUE) {
$path = getcwd() . "/test/";
$path = str_replace("\\","/",$path);
mkdir($path, 0777);
$zip->extractTo($path);
$zip->close(); }