明明上传了图片,判断图片图型时不通过。
下面的代码,
我上传图片,
总是显示:
出错.
请问这个判断语句,
错了?
请详细一些。
谢谢
<br /> <br /> <br /> if ((($_FILES['logo_file1']['type'] == "image?gif")<br /> || ($_FILES['logo_file1']['type'] == "image?jpeg")<br /> || ($_FILES['logo_file1']['type'] == "image?jpg")<br /> || ($_FILES['logo_file1']['type'] == "image?pjpeg"))<br /> && ($_FILES['logo_file1']['size'] < 10485760)) {<br /> <br /> echo "上传图片.";<br /> <br /> } else {<br /> echo "出错.";<br /> }<br /> <br /> <br />
<br /> if ((($_FILES["file"]["type"] == "image/gif")<br /> <br><font color='#FF8000'>------解决方案--------------------</font><br> ($_FILES["file"]["type"] == "image/jpeg")<br /> <br><font color='#FF8000'>------解决方案--------------------</font><br> ($_FILES["file"]["type"] == "image/pjpeg"))<br /> && ($_FILES["file"]["size"] < 20000)){ <br /> echo "上传图片."; }else {<br /> echo "出错."; } <br /> <br /> <br />