Answer the question
In order to leave comments, you need to log in
Is checking the type of files sufficient?
Users have the ability to upload pictures to the site. Is such a check on the pictures enough?
if ((( $_FILES [ "file" ][ "type" ] == "image/gif" )
|| ( $_FILES [ "file" ][ "type" ] == "image/jpeg" )
|| ( $_FILES [ "file" ][ "type" ] == "image/jpg" )
|| ( $_FILES [ "file" ][ "type" ] == "image/png" ))
Answer the question
In order to leave comments, you need to log in
The most effective option is to prohibit the execution of code from the downloads folder. For example, using rules in .htaccess.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question