search

Home  >  Q&A  >  body text

I just started learning PHP. When configuring the site domain name, I opened the hosts file. After binding 127.0.0.1 to the domain name, I saved the hosts file. It always pops up and saves it in another place. This fails. How to solve it?

覃2661 days ago1519

reply all(3)I'll reply

  • qzuser

    qzuser2017-10-01 11:50:10

    When opening hosts under windows, right-click and open as "Administrator" and then save.

    Under hosts under linux, you can use root or sudo to open and save.

    reply
    0
  • 文若

    文若2017-09-30 13:36:35

    First open the file where the file is located, the path is: c:windowssystem32driversetc

    Then we right-click on the file and select the properties option

    Then in the properties window that opens, we switch to the Security tab

    Then we select the Advanced button of the Security tab:

    In the new window that opens, we select the button to change permissions

    Then in the new window that opens, remove the permissions included from the parent of this object item inherited permissions, and then click the Add button

    After clicking the Add button, we return to the window, click the OK button, the windows security window pops up, we click the Yes button

    Then we Click the OK button again, return to the initial properties window, then select all the administrator groups of our current user, and press the edit button

    In the pop-up window, we check the management group where the current user is located, Give full control permission

    After the modification is completed, click the OK button, and then click the OK button again, so that you can modify the Hosts file.


    reply
    1
  • 覃

    Thank you solved

    · 2017-09-30 16:47:13
  • Day

    Day2017-09-30 11:25:29

    It may be a problem with C drive permissions. You can save it to the desktop first, and then copy and replace it to the host file corresponding to C:WindowsSystem32driversetc.

    reply
    1
  • 覃

    Thank you, I'll try it

    · 2017-09-30 11:27:05
  • Cancelreply