homer.favenir Posted September 17, 2009 Share Posted September 17, 2009 hi, i have a web app with script that download zip file. i trie to use it in Mac, i downloaded a zip file, and it is successful. but when i unzip it, it has an error "Error -1 Operation not Permitted" i copy the zip file to pc and it unzipped successfully, so the file is not corrupted. i think the problem is in the downloading process. heres my code function GetArticle($strSourceAbsoluteFilePath,$artid) { $retVal = FALSE; if ((!isNullorEmpty($strSourceAbsoluteFilePath)) && (!isNullorEmpty($_SESSION['userid'])) ) { $artid = str_replace(".zip","",$artid); if ((ReturnArticleOwner($artid) == $_SESSION['userid']) && (IsArticleAssigned($artid)) && (file_exists($strSourceAbsoluteFilePath))) { //OKAY sa kanya to and its not yet assigned header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . basename($strSourceAbsoluteFilePath)); //$retVal = readfile($strSourceAbsoluteFilePath); $retVal = readfile_chunked($strSourceAbsoluteFilePath,TRUE); } else //<-dont forget! { die("Invalid attempt to download article."); } } return $retVal; } TIA Link to comment https://forums.phpfreaks.com/topic/174564-download-zip-file-for-mac/ Share on other sites More sharing options...
khr2003 Posted September 17, 2009 Share Posted September 17, 2009 sometimes the file is partially corrupted but it still works. Try downloading your file using Chrome Browser. additionally, try editing the zip file using notepad (right-click on it -> open with -> choose text editing program). If you get any text that you can understand (mostly HTML) then the file is currpoted and there is something wrong with the downloading process. Link to comment https://forums.phpfreaks.com/topic/174564-download-zip-file-for-mac/#findComment-919993 Share on other sites More sharing options...
homer.favenir Posted September 18, 2009 Author Share Posted September 18, 2009 but there is no chrome for mac ? its still in process any idea guyz? TIA Link to comment https://forums.phpfreaks.com/topic/174564-download-zip-file-for-mac/#findComment-920452 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.