enter image description hereThis is my first post here and i’m looking for getting some help.
I have recently taken courses in HTML/CSS/JavaScript and I feel pretty comfortable in that. Now i’m getting into PHP, and noticed that i need a localhost. I downloaded MAMP, added my website files to the htdocs but I cannot find my index.html in the localhost.
This is what I put in the browser: localhost/htdocs/web-development/Portfolio/index.html
What i’m trying to do is to preview my website and try my registration form which is done with html/css/javascript and php/phpmyadmin.
Even though I can understand and code HTML/CSS/JavaScript and still fairly new to programming so let me know if I explained it a bit messy.
I’m using Atom for coding.
Lukas
2
Answers
The default configuration for
MAMP
uses ports8888
and8889
, and7888
, you can see the default port in controle panel under portshttp://localhost:{port number}/{project folder}/index.html -> ( if write php file this could be index.php)
htdocs
represents web root that you no need to use in urlBased on your image, your index.html file is in your forms folder, so you have two options:
Move your index.html into your portfolio file and have the server automatically serve it when the address localhost/htdocs/web-development/Portfolio is requested.
Change your URL route to localhost/htdocs/web-development/iPortfolio/forms/index.html
The first would be more in keeping with standards – the server will search for an index.html/php file in the route of a website, which is why people generally use this file for their homepage, as noted here Why do people name their files index.html?