I am trying to upload images and transfer them immediately to a specific folder.
Here's my code:
$file_path = "assets/placervw_photo/";
$file_path = $file_path . $_FILES['uploaded_file']['name'];
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $file_path))
{
echo "success";
}
The page displays "success" but when I check the folder, it contains the file, having the same filename and file type, but it turns into a smal red X icon with white background. Here's a look: http://s14.postimg.org/ifoiyzde5/red_x.png
I have tested it to jpg and png files and they had the same outcome.
Any suggestions on how I can solve this? Thanks in advance! :)