vendredi 30 octobre 2015

Fileuploading not work in PHP while I select file which contains = in it's name

When i upload any image file which contains '=' in filename then server says that 404 page not found. and if i upload any other file which is not contain '=' in name then it will successfully uploaded. is there any server access issue. should i make change in .htaccess file? because i have host this code in two different host provider. godaddy and namecheap. godaddy allows us to upload any image with any name i.e it uploads image which containt '=' but same code not work on namecheap. I am sure that code doesn't have any issue. I am using below code

<script src="http://ift.tt/Y75GEe"></script>
<script type="text/javascript">
$(document).ready(function (e) {
    $("#uploadForm").on('submit',(function(e) {
            e.preventDefault();
            alert(filename);
            $.ajax({
                url: "upload.php",
                type: "POST",
                data:  new FormData(this),
                contentType: false,
                processData:false,
                success: function(data)
                {
                    $("#targetLayer").html(data);
                },
                error: function(){}             
         });
      }));
   });
</script>
<form id="uploadForm" action="upload.php" method="post"  enctype="multipart/form-data">
  <div id="targetLayer">No Image</div>
  <div id="uploadFormLayer">
  <label>Upload Image File:</label><br/>
  <input name="userImage" type="file" class="inputFile" />
  <input type="submit" value="Submit" class="btnSubmit" />
</form>

Aucun commentaire:

Enregistrer un commentaire