I'm trying to upload a photo using the following code. Suppose I'm uploading "abc.gif". It uploads in the proper directory as "abc.jpg". But my question is does the file type actually change?
$file_name = $_FILES['input_name']['name'];
$file_tmp =$_FILES['input_name']['tmp_name'];
move_uploaded_file($file_tmp, "abc.jpg");
This piece of code works perfectly while uploading. But while making a resized copy of this abc.jpg using—
imagecreatefromjpg("abc.jpg") & imagejpeg()
—it shows a black screen.
When I move the file using the extension .jpg, does the file type actually change? Why does this problem occur?