![](/img/trans.png)
[英]My PHP App won't display in localhost (only the folders will). I'm using MAMP - app is held in standard htdocs folder
[英]MAMP installed and htdocs is set as localhost but can't see folder within localhost
我已经在Windows 7笔记本电脑上设置了MAMP,并将localhost设置为htdocs文件夹。 我创建了一个数据库,并在该文件中命名了数据库,用户名和密码后,将wp-config_sample.php重命名为wp-config。
appache服务器和MYSQL服务器已打开。 在Chrome浏览器中,如果我输入localhost /,则会显示以下内容:
index of/
test.php
但是htdocs中名为testsite的wordpress文件夹不可见,如果我键入localhost / MAMP /,则在浏览器中将正确显示MAMP页面。 如果我键入localhost:3306 / testsite,则会显示以下内容:
This page isn’t working
localhost sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
MySQL端口已更改为3306,这是免费的
如果我输入localhost / testsite,将显示以下内容:
Forbidden
You don't have permission to access /testsite/ on this server.
请让我知道我需要在帖子中添加哪些其他信息。 谢谢
您需要设置文件夹权限才能在本地主机中查看文件夹
运行命令chmod *** /folder
更改权限
@更新:
然后,您应该尝试在Mamp的host file.conf中添加这样的行
Alias /mytest/ "C:/mytest/"
<Directory "C:/mytest/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
Require local
</Directory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.