您当前的位置: 首页 >  php

漏刻有时

暂无认证

  • 1浏览

    0关注

    717博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

php环境部署:phpstudy设置本地测试域名找不到hosts文件的解决方案

漏刻有时 发布时间:2021-03-09 15:43:56 ,浏览量:1

在这里插入图片描述 在win10上配置phpstudy本地域名,发现找不到hosts文件。 hosts文件的位置:C:\WINDOWS\system32\drivers\etc 解决方案如下:

  1. Windows 徽标键 图片+X键,调出cmd命令行工具; 在这里插入图片描述
  2. 输入一下代码:
for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
  1. 正常创建并显示: 在这里插入图片描述
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

lockdatav Done!

关注
打赏
1661217259
查看更多评论
立即登录/注册

微信扫码登录

0.0385s