Problem Statement
How do you handle file uploads in PHP?
Explanation
PHP stores uploaded files in a temporary directory using the $_FILES array. You can then move them to a permanent location using move_uploaded_file. Always validate the file type and size for security.
Code Solution
SolutionRead Only
move_uploaded_file($_FILES['photo']['tmp_name'],'uploads/photo.jpg');
