当前位置:网站首页>PHPstudy建站提示hosts文件可能不存在或被阻止打开,同步hosts失败怎么解决
PHPstudy建站提示hosts文件可能不存在或被阻止打开,同步hosts失败怎么解决
2022-06-12 14:44:00 【李洋个人博客】
相信很多人在本地搭建网络环境的时候都会用到PHPstudy,我很少使用本地的集成环境,并不是因为程序问题而是因为懒,毕竟在本地搭建网络环境之后下班或者在其他的确不能使用了,还得远程遥控别人操作,比较繁琐,我不用但是公司本地环境都是用PHPstudy搭建的,偶尔也会遇到一些问题,但是还好都能很容易解决,也就很少发布相关文章,今天偶尔建站之后提示“hosts文件可能不存在或被阻止打开,同步hosts失败”,因为是win10系统,第一反应就是权限问题,解决方法就是给本地hosts权限。
解决方法:
首先我们要找到hosts文件路径:C:\Windows\System32\drivers\etc 目录下,查看hosts文件,注意文件没有任何后缀,然后邮件属性查看是否勾选了“只读”模式,如图:
如果没有勾选只读点击顶部tab“安全”查看是否有Users或者Everyone,有的话给“完全控制”允许,没有的话点击底部“高级”选项,如图:
点击高级之后弹出的新窗高级安全设置中点击底部添加,因为我之前设置过,所以已经有Everyone和User的权限了,正常User权限就够了,但是并不确定都好用,如图:
在权限项目中点击“选择主体”弹出新窗选择“高级”,在新窗选择“立即查找”,找到对应的用户,点击确定,如图:
选中对应的用户之后,我们勾选“完全控制”如图:
最后点击确定,然后返回PHPstudy,重新新建站点,设置相关配置及域名,然后确定就会提示网站新建成功,查看hosts文件会发现有最新同步的站点信息,其实这个问题并不难,就是权限没有给全或者文件被设置了只读权限就是只能读取不能写入,所以会提示同步hosts失败,好了,问题解决,又双叒叕完成一篇“伟大”的著作,哈哈哈,有问题留言反馈,潜水去~
边栏推荐
- tc菜单分割
- Autofac浅学(2)
- Raspberry pie get temperature and send pictures to email
- Detailed explanation of factory pattern (simple factory pattern, factory method pattern, abstract factory pattern) Scala code demonstration
- 【Environment】1. Get the configuration in YML through the environment in the configuration class
- Introduction to QT reflection mechanism and signal slot mechanism
- [wechat applet] 2 Environmental preparation
- Data collection
- Jetpack架构组件学习(3)——Activity Results API使用
- Unit test (I) unit test with JUnit
猜你喜欢

C 操作符

Recursive summary of learning function

Installation and use of mat

JS (II) syntaxerror: cannot use import statement outside a module

Interview (XI) futu written test questions

Software package for optimization scientific research field

junit测试套件方法整理(方法二不太好用)

selenium-webdriver之断言

数据的收集

Two methods of implementing asynchronous calling function with QT
随机推荐
程序构造和解释之第一章习题
Tu oses le croire? Il m'a fallu deux jours pour développer un système de gestion.
MySQL index and view
New technology: efficient self-monitoring visual pre training, local occlusion no longer need to worry!
C secret arts script Chapter 2 (detailed explanation of pointer) (Section 1)
数组相关内容
C 操作符
NetCore结合CAP事件总线实现分布式事务——入门(1)
工业机械臂(机器人)视觉定位引导系统
JS (III) convert ES6 syntax to Es5 syntax
Thinking: what is asynchrony and thread safety
[wechat applet] 3 The first wechat applet
Jenkins' RPC test project
程序构造和解释之过程抽象
Two methods of QT using threads
【LDA】EM变分推理 粗略版笔记【待完善
Introduction to QT reflection mechanism and signal slot mechanism
Common DOS commands
Two months' experience in C language
Soft test (VI) Chrome browser installation selenium IDE