Php Objective Questions with Answers for written test exams 56

Question 56
Which of the following functions can be used to escape data such that it can be

displayed without altering the appearance of the original data?

A. htmlspecialchars()

B. addslashes()

C. escapeshellargs()

D. urlencode()
Answers 56


Answer A is correct because htmlspecialchars() will convert special characters

to HTML entities that will display correctly in any Web client. Answer B is incorrect

because addslashes() only escapes single quotes. Answer C is incorrect

because escapeshellargs() is only helpful when dealing with shell command

arguments. Answer D is incorrect because URL encoding is not interpreted by

Web clients except in the context of URLs.

  







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 ---