What is the problem with this program? Why is the running unsuccessful? PHPcode & lt ;? Php $ authorized = false; if (isset ($ _ SERVER [& quot; PHP_AUTH_USER & quot;]) & amp; isset ($ _ SERVER [& qu what is the problem with this program? Why is the running unsuccessful?
PHP code
My d: \ li.txt file:
Jason: 60d99e58d66a5e0f4f89ec3ddd1d9a80
Donald: d5fc4b0e45c8f9a333c0056450c191cf
Mickey: bc180dbc583491c00f8a1cd134f7517b
After the user name and password are entered, $ authorized = false. the input box is displayed, indicating that You have entered the password. After three times, You must provide the proper credentials are displayed! Indicates that the input is incorrect...
------ Solution --------------------
Are you sure you entered the password 60d99e58d66a5e0f4f89ec3ddd1d9a80?
This is the encrypted password, while $ _ SERVER ["PHP_AUTH_PW"] is the unprocessed plaintext.
------ Solution --------------------
So long password string, can you ensure that you do not enter the wrong?
$ AuthFile = file ("D:/li.txt ");
Obviously, you work in a window.
In this case, besides the new line "\ n", the line ends with the carriage return "\ r"
How can we make a correct match if you haven't calculated it?