![](/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.