+ 2
What have i done wrong?
So i made some kind of php code, but it doesn't work when i open it in browser and there was my code as a simple text please help
2 ответов
+ 3
You need to install PHP first. Just Google “how to install PHP on <insert your OS here>” and you’ll find something. (Your OS is your operating system - Windows, Mac, Linux etc.)
+ 1
Add the opening tag at the beginning of your code
<?php
Also you can not access it with the file:// protocol. You have to install php on your machine snd do the following
$ cd /path/to/your/file
$ php -S localhost:8080
Then visit http://localhost:8080