You are building a profile page where users can upload their profile pictures. Which PHP function would you use to ensure the uploaded file is an image type?

  • getimagesize()
  • is_uploaded_file()
  • file_get_contents()
  • move_uploaded_file()
The getimagesize() function is used to determine the type of an uploaded file and ensure it's an image type, based on the returned image type information.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *