Zend 200-710 Exam - Topic 9 Question 30 Discussion
An HTML form contains this form element:When this form is submitted, the following PHP code gets executed:move_uploaded_file($_FILES['myFile']['tmp_name'],'uploads/' . $_FILES['myFile']['name']);Which of the following actions must be taken before this code may go into production? (Choose 2)
B) Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers and D) Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged
A) Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid
C) Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file
E) Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility
Kirk
11 months agoBettina
11 months agoAlonzo
11 months agoNaomi
11 months agoElli
11 months agoTayna
12 months agoKandis
12 months agoLazaro
12 months agoLachelle
12 months agoAlonso
12 months agoGlennis
12 months agoDarnell
1 year agoMelissia
1 year ago