jeff42 Posted September 28, 2006 Share Posted September 28, 2006 Hi,I'm new to php, learning as I go. I'm trying to write a simple file checking function to verify that an uploaded file is a zip file. It works fine for Mac users but not for Windows users. I have no idea why this is happening.Here's a piece of my code:if($img_type == "application/zip"){ // COPY FILE TO DIRECTORY copy($img_data, $path . $new_image_name);After much frustration, I changed the first line to this:if("1"){... and then everything else works as it should. The file gets moved to the right directory, etc.For some reason it's not recognizing zip files created on Windows machines, at least not with the code I'm using.Any ideas?Thanks! Quote Link to comment Share on other sites More sharing options...
Orio Posted September 28, 2006 Share Posted September 28, 2006 How do you define $img_type ?Orio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.