SarkariResultess QA Bank

PHP file existence check कैसे करते हैं? को secure तरीके से कैसे implement करें?

Other 0 Views Verified
PHP file existence check कैसे करते हैं? को secure तरीके से कैसे implement करें? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

exists_file('data.txt')

exists_file('data.txt')
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

file.isExists('data.txt')

file.isExists('data.txt')
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified Correct Answer

file_exists('data.txt')

file_exists('data.txt')
Additional Explanation
file_exists() path existence check करता है। User input को trust न करें; validation, escaping और prepared statements context के अनुसार उपयोग करें।
Verified

has_file('data.txt')

has_file('data.txt')
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।