php FileType如果不起作用

时间:2017-10-04 15:19:38

标签: php image file upload

if ($uploadOk == 0) {
    echo "Sorry, your file was not uploaded.";
// if everything is ok, try to upload file
} else {
    if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
        echo "<br><br><br><br><br><br><br><br>";
        echo "
        <center>
        <div style=\"font-size:300%\">The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.</div>
        </center>
        ";


        if($imageFileType == "jpg" && $imageFileType == "png" && $imageFileType == "jpeg" && $imageFileType == "gif" && $imageFileType == ".jpg") {
            echo "<br><br><br><br><br><br><br><br>";
            echo "<center><meta http-equiv=\"refresh\" content=\"2;url=http://79.176.32.166/?img=". basename( $_FILES["fileToUpload"]["name"]). "\"/></center>";
        }else{
            echo "<center><meta http-equiv=\"refresh\" content=\"2;url=http://79.176.32.166/?rarOrZip=". basename( $_FILES["fileToUpload"]["name"])."\"/></center>";
        }
    } else {
        echo "Sorry, there was an error uploading your file.";
        echo "<meta http-equiv=\"refresh\" content=\"5;url=http://eib5i7knmc5utt3e.onion\"/>";
    }
}

你好,我试图传送用户,例如他等于png或jpg ..但它只是不适合我

0 个答案:

没有答案