I just installed WAMP server to start practicing PHP. I created a folder in www directory. However, when I try to run the file from localhost it does not run.
For ex, I created a folder "test"
in www directory. I saved an HTML file called "test.html" inside the test folder. Basically I have saved it in www --> test --> test.html
.
I started localhost in my browser. I found test folder there. But when I click that test folder, instead of opening as "localhost/test"
, it is opening as just "test/"
. How to make sure that the folder, when clicked inside localhost, should open as "localhost/<foldername"
(in this case "localhost/test"
).
When I type as "localhost/test"
in my browser, it works fine. But when I go to localhost and click on "test"
folder it does not open.
Please help me to overcome this.
Thanks in advance.
You should type the file name and the extension to open the file from the local host as your file is not index.html so you should go to "localhost/test/test.html" that would work if you want your file to