Php 已安装MAMP,并且htdocs设置为localhost,但可以';在本地主机中看不到文件夹

Php 已安装MAMP,并且htdocs设置为localhost,但可以';在本地主机中看不到文件夹,php,mysql,wordpress,localhost,mamp,Php,Mysql,Wordpress,Localhost,Mamp,我已经在windows 7笔记本电脑上设置了MAMP,并将localhost设置为htdocs文件夹。 我已经创建了一个数据库,并在命名了该文件中的DB、用户名和密码后,将wp-config_sample.php重命名为wp-config appache服务器和MYSQL服务器已打开。 在Chrome浏览器中,如果键入localhost/将显示以下内容: index of/ test.php This page isn’t working localhost sent an invalid r

我已经在windows 7笔记本电脑上设置了MAMP,并将localhost设置为htdocs文件夹。 我已经创建了一个数据库,并在命名了该文件中的DB、用户名和密码后,将wp-config_sample.php重命名为wp-config

appache服务器和MYSQL服务器已打开。 在Chrome浏览器中,如果键入localhost/将显示以下内容:

index of/
test.php
This page isn’t working
localhost sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
Forbidden
You don't have permission to access /testsite/ on this server.
但是htdocs中名为testsite的wordpress文件夹不可见 如果在浏览器中键入localhost/MAMP/则会正确显示MAMP页面。 如果我键入localhost:3306/testsite,将显示以下内容:

index of/
test.php
This page isn’t working
localhost sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
Forbidden
You don't have permission to access /testsite/ on this server.
MySQL端口已更改为3306,这是免费的

如果我键入localhost/testsite,将显示以下内容:

index of/
test.php
This page isn’t working
localhost sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
Forbidden
You don't have permission to access /testsite/ on this server.

请让我知道什么其他信息,我需要在这个职位。谢谢

您需要设置文件夹权限才能在localhost中查看文件夹

运行命令
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>
Alias/mytest/“C:/mytest/”
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
要求本地

我正在使用windows,当我查看文件夹的属性时,管理员和非管理员都可以完全控制文件夹testsite及其子文件夹请尝试上述解决方案或者我很难找到主机文件。conf.C:\MAMP\conf\apache\httpd.confI添加了主机文件中的行,将C:/mytest/替换为C:/MAMP/testsite,但我仍然收到与上面相同的错误消息。