Jump to content

file uploaded in different type


arvi_mca

Recommended Posts

Hai,

 

  When i tried to upload the image file ,it is not uploaded in the right format.

 

  Before the uploading the file using copying the file to the server it showing in the jpeg format

 

    but after it is copied it showing me text/html format.When right cliked and checked the property of the image,

 

  Can anyone help What is the problem,is the problem with my server i am using Debian Linux Apache1.3 server,or my coding?.

 

Coding

=====

admin.php

---------

<?php

if($_POST["subupload"]=="Upload") {

   copy($_FILES["img"]["tmp_name"],"images/" . $_FILES["img"]["name"]);
}
?>
<form name="frmupload" action="admin.php" method="post" enctype="multipart/form-data">
     <input name="subupload" type="submit" value="Upload">
     <input name="img" type="file">
</form>

Link to comment
https://forums.phpfreaks.com/topic/107947-file-uploaded-in-different-type/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.