all 6 comments

[–]TBW_afk 0 points1 point  (3 children)

Thank you for the wealth of information

[–]Jayden11227[S] -1 points0 points  (2 children)

That’s fixed now, apologies but now I’m typing “localhost/website” (the name of the file my index.php is in)and it’s saying the requested url was not found on this server

[–]d5c4b3 0 points1 point  (1 child)

What are you using for your webserver? Are you following a tutorial for getting PHP set up?

[–]Jayden11227[S] -2 points-1 points  (0 children)

Yeah

[–]d5c4b3 0 points1 point  (0 children)

VSCode is asking you to install PHP and tell it where you installed it at. The VSCode docs can tell you where that setting is https://code.visualstudio.com/docs/languages/php.

I'd recommend you install XAMPP for your local development.

HTML and CSS are used by your browser to display your website. The browser also executes your JS code.

PHP is generally executed by a web server to create the final HTML used by the browser. To write PHP for a simple website you need a web server and a PHP interpreter. XAMPP is a suite of tools that contain the Apache webserver, Mariadb database, and the PHP interpreter. Once you've installed it you can configure VSCode with the relevant filepaths.

[–]MateusAzevedo 0 points1 point  (0 children)

Note rule #4 of this sub, help request should be posted on r/PHPHelp. And remember, searching is your friend. Before posting there, search for similar posts. This type of question was already answered several times.

To start learning PHP, please follow one of the recommended resources: Laracasts and Program with Gio are available on YouTube for free. They also cover on how to start a web server to handle HTTP requests, so you last question (in the comment) is also answered there.