Need help previewing project! Where did I mess up?

I’m a complete newbie following this “tutorial for dummies” here: https://www.youtube.com/watch?v=dWzzRkxrTMA

I tried to preview my project, did everything exactly how the creator of the video said, and all I get is an index of my project…? It has something called a parent directory if that helps. Sorry I’m totally new and just trying to learn PHP, but I keep getting problems like this and getting frustrated. Usually I work them out on my own, but I can’t figure this one out. Any help is appreciated, please! Thank you! :slight_smile:

Sounds like your loading your php page in the browser directly. PHP needs a server to run the easiest way to get started is by using something like MAMP https://www.mamp.info/en/ this allows you to run php on a local server without having to configure it yourself.

Once installed put your php files in the htdocs folder then you can preview them by going to your localhost on a mac its localhost:8888 it will be similar on Windows, if I remember correctly there is a button you can press to open the page in your browser.

Sponsor our Newsletter | Privacy Policy | Terms of Service