Php Objective Questions with Answers for written test exams 53

Question 53
What is the purpose of the escapeshellcmd() function?

A. To prepare data so that it can be used as a single argument in a shell command.

B. To remove malicious characters.

C. To escape metacharacters, so that they can’t be used to execute arbitrary

commands.

D. To prevent cross-site scripting attacks
Answers 53


Answer C is correct. Answer A is incorrect because escapeshellcmd() does not

attempt to solve this problem. Answer B is incorrect because escapeshellcmd()

does not actually remove characters. Answer D is incorrect because escaping data

to protect against cross-site scripting is much different than escaping data to be

used in a shell command.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---