###前提・実現したいこと
いつもお世話になっております。
表題の件、パソコンから写真をアップロードすると問題なくできるのですが、
ipadからアップロードすると、できません。ただ、たまに出来たりしたり・・・
ios特有の何か処理が必要なのでしょうか?
検索しても、それらしい情報にぶつからず悩んでいます。
何かヒントなり頂ければ助かります。
よろしくお願いします。
###該当のソースコード
#### 下記、画像を選択してPOSTする部分 function dataEntry(){ // ちょっとした入力チェックを行うスクリプト(省略) document.frmMain.enctype = "multipart/form-data"; document.frmMain.method = "post"; document.frmMain.action = 'upload_photo.php'; document.frmMain.submit(); <FORM name="frmMain" method="post" action="upload_photo.php" enctype="multipart/form-data"> <input type="file" id="upload1" name="images" class="btn btn-default" accept="image/png, image/jpeg, image/gif, image/jpg" /> <input type="button" onclick="dataEntry();" class="btn btn-default" id="id_createbtn" name="create" value="送信"> ###下記、画像処理する部分 resizeImage($_FILES["images"],(int)$_POST["width"]); function resizeImage($image,$new_width,$dir = "./filephoto"){ list($width,$height,$type) = getimagesize($image["tmp_name"]); $new_height = round($height*$new_width/$width); $emp_img = imagecreatetruecolor($new_width,$new_height); var_dump("#1#".$type); switch($type){ case IMAGETYPE_JPEG: $new_image = imagecreatefromjpeg($image["tmp_name"]); //iphoneの向きに対応してみる。 $exif_datas = @exif_read_data($new_image); var_dump("#2#".$exif_datas['Orientation']); var_dump("#3#".$new_image); if(isset($exif_datas['Orientation'])){ $orientation = $exif_datas['Orientation']; if($new_image){ // 未定義 if($orientation == 0){ // 通常
###試したこと
var_dumpで1、2、3と情報を表示させています。
パソコンからだと、1と3に値が入りますが、
->> string(4) "#1#2" string(3) "#2#" string(17) "#3#Resource Id#6"
iosだと、1までで、値は取得しません。
->> string(3) "#1#"
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。