OR Statement in PHP Causing issue [closed]

OR Statement in PHP Causing issue [closed]



I am trying to compare md5 value for my files using this condition:


if (md5_file("src/protocol_config.php")!="e5468e87cafe56b79ba232a3a82c051b" ||("src/protocol_func.php")!="04b8dec66a678fd3328b0ddbec7e3f60")

echo "Unauthorized modification detected";
exit();



Both file values are true, but I am still getting this error:


Unauthorized modification detected



If I only use one file without OR condition, it works like charm, so I think there is something wrong in my OR statement, but I am not able to get it. Let me know if someone can help me solve it.
Thanks



This question appears to be off-topic. The users who voted to close gave this specific reason:





you are comparing two strings in the 2nd part of the OR, you missed md5_file
– ᴄʀᴏᴢᴇᴛ
Sep 4 '18 at 8:00



md5_file




2 Answers
2



Try


if (md5_file("src/protocol_config.php") !="e5468e87cafe56b79ba232a3a82c051b" || md5_file ("src/protocol_func.php" )!="04b8dec66a678fd3328b0ddbec7e3f60")

echo "Unauthorized modification detected";
exit();



you are missing the md5_file function in the second part of the check.





This should just be closed as a typo, it's not worth a real answer.
– Barmar
Sep 4 '18 at 8:11



You miss md5_file after the or:


md5_file


if (md5_file("src/protocol_config.php")!="e5468e87cafe56b79ba232a3a82c051b" ||
md5_file("src/protocol_func.php")!="04b8dec66a678fd3328b0ddbec7e3f60")





This should just be closed as a typo, it's not worth a real answer.
– Barmar
Sep 4 '18 at 8:10

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế