This is the problem with the ipad safari or Chrome.
html
php
upload_file.php
0) {//echo "Return Code:". $_files["File" ["Error"]. "
"; } else {echo "Upload:". $_files["File" ["Name"]. "
"; echo "Type:". $_files["File" ["type"]. "
"; echo "Size:". ($_files["File" ["Size"]/1024). The Kb
"; echo "Temp file:". $_files["File" ["Tmp_name"]. "
"; if (File_exists ($DIR. $_files["File" ["Name"])) {echo $_files["file" ["Name"]. "already exists."; Header (' location:http://59.78.7.9/index.html '); } else {move_uploaded_file ($_files["file"] ["Tmp_name"], $DIR. $_files["File" ["name"]); echo "Stored in:". $DIR. $_files["File" ["Name"]; Header (' location:http://59.78.7.9/index.html '); }}} else {echo "Invalid file, you can ' t upload files of". $postfix;}? >
Reply content:
This is the problem with the ipad safari or Chrome.
html
php
upload_file.php
0) {//echo "Return Code:". $_files["File" ["Error"]. "
"; } else {echo "Upload:". $_files["File" ["Name"]. "
"; echo "Type:". $_files["File" ["type"]. "
"; echo "Size:". ($_files["File" ["Size"]/1024). The Kb
"; echo "Temp file:". $_files["File" ["Tmp_name"]. "
"; if (File_exists ($DIR. $_files["File" ["Name"])) {echo $_files["file" ["Name"]. "already exists."; Header (' location:http://59.78.7.9/index.html '); } else {move_uploaded_file ($_files["file"] ["Tmp_name"], $DIR. $_files["File" ["name"]); echo "Stored in:". $DIR. $_files["File" ["Name"]; Header (' location:http://59.78.7.9/index.html '); }}} else {echo "Invalid file, you can ' t upload files of". $postfix;}? >
- That's right. The picture on the ipad doesn't have the concept of "file name" at all.
- When storing files, do not discard the same file name ... File storage is not a preemptive type ...
- A file with the same name plus a suffix, or simply the entire file after the calculation SHA-1 with a checksum file name.
- Determine the file type cannot depend on the file extension, but use the
exif_imagetype()
function to check the actual file header.
May I ask how this problem is solved? I am the Apple phone upload image name is changed to Image.jpg by default. We're using HTML5. Android and browser uploads are normal.