New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Zend PHP 5 Certification 200-500 Question # 33 Topic 4 Discussion

Zend PHP 5 Certification 200-500 Question # 33 Topic 4 Discussion

200-500 Exam Topic 4 Question 33 Discussion:
Question #: 33
Topic #: 4

An HTML form contains this form element:

<input type="file" name="myFile" />

When this form is submitted, the following PHP code gets executed:

1 <?php

2 move_uploaded_file(

3 $_FILES['myFile']['tmp_name'],

4 'uploads/' . $_FILES['myFile']['name']);

5 ?>

Which of the following actions must be taken before this code may go into production?

(Choose 2)


A.

Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid


B.

Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers


C.

Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file


D.

Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged


E.

Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility


Get Premium 200-500 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.