SarkariResultess QA Bank

PHP HTML output escape करने के लिए common function क्या है? को debug कैसे करें?

Other 0 Views Verified
PHP HTML output escape करने के लिए common function क्या है? को debug कैसे करें? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

strip_tags($value);

strip_tags($value);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

html_escape_only($value);

html_escape_only($value);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified Correct Answer

htmlspecialchars($value, ENT_QUOTES, 'UTF-8');

htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
Additional Explanation
htmlspecialchars() HTML special characters encode करता है। पहले exact error message, line number और input value check करें।
Verified

escape_html_manual($value);

escape_html_manual($value);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।