/ Published in: PHP
URL: http://www.w3school.com.cn/php/php_file_upload.asp
Expand |
Embed | Plain Text
<?php if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 200000)){ if ($_FILES["file"]["error"] > 0){ }else{ } else{ "upload/" . $_FILES["file"]["name"]); } } }else{ echo "Invalid file<br />"; } ?>
You need to login to post a comment.
