PHP Security
PHP Security - Important Points
26. | Which of the following is a method to prevent file inclusion vulnerabilities in PHP? |
---|
A. Using SSL encryption
B. Disabling file inclusion functions
C. Storing files outside the web root directory
D. Storing files in plaintext
View Answer Discuss Work SpaceAnswer: option c
Explanation:
27. | What is the purpose of the filter_input() function in PHP? |
---|
A. To encrypt data
B. To validate user input
C. To remove HTML tags from a string
D. To regenerate the session ID
View Answer Discuss Work SpaceAnswer: option b
Explanation:
28. | What is the purpose of the ctype_digit() function in PHP? |
---|
A. To check if a variable is a number or a numeric string
B. To check if a variable is a string
C. To check if a variable is an array
D. To check if a variable is an object
View Answer Discuss Work SpaceAnswer: option a
Explanation:
29. | Which of the following is a method to prevent code injection attacks in PHP? |
---|
A. Allowing file uploads
B. Disabling input validation
C. Using prepared statements and parameterized queries
D. Storing passwords in plaintext
View Answer Discuss Work SpaceAnswer: option c
Explanation: