Unable to see folder directory in localhost

南笙酒味 提交于 2021-02-11 08:12:29

问题


I am trying to get a website to run locally on my Mac.

I have installed MAMP and both Apache and MySQL Servers are running. I have tested MAMP and got the initial "Welcome" message where they tell you all is fine and to delete the default index.php file from MAMAP/htdocs.

I delete this file and in MAMP/htdocs I create a test folder called Hello and the folder for the website called Want.

The website I am trying to run locally is an existing website and I have FTP access to the code. I have downloaded all the files and folders for Want to my desktop. I now put all Wants content in MAMP/htdocs/Want.

In the browser I go to localhost and I can see my 2 folders I created in there: Want and Hello see screen grab.

enter image description here

If I click on the Want folder, the browser just times out. I don't see a sub directory with all of Want's files and folders in it.

To test its working I create a hello.php file and place it in Hello folder. In localhost I select Hello and can see my hello.php file in there and clicking on it just echoes back hello - as was intended. enter image description here

I then remove all content from Want folder and copy hello.php into the Want folder. This works perfectly and I can see the hello.php and clicking on it echoes Hello back.

But when I copy back the content of Want back into the Want folder, the browser just times out again when I click on the Want folder to view the sub directories.

I have also tried just copying index.php from the original Want folder into my Want folder but still the browser just times out.

Does anyone have any idea what can be causing this?


回答1:


Just had the same problem. What I managed to do was to delete .htaccess and to write it once again. The problem was that I had a SPACE between one of the ">".



来源:https://stackoverflow.com/questions/21713821/unable-to-see-folder-directory-in-localhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!