What are the problems related to this program? Why is the running unsuccessful?

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.