+ 3
How do I save my php file? For example: CSS(.css) HTML(.html) and do I need a network before I can display / output my code.
How do I save my php file? For example: CSS(.css) HTML(.html) and do I need a network before I can display / output my code.
6 Answers
+ 3
Save it with .php extension.
Actually, this is different from HTML and CSS that runs on the client's computer. PHP has to run on a server.
The easiest way is to install a LAMP stack software like XAMPP.
https://www.apachefriends.org/download.html
No configuration is needed.
If you just need PHP alone without MySQL, Tomcat, Filezilla.... You can download the binary from their official website.
https://www.php.net/downloads.php
You can simply start the built-in web server with the -S command
php -S 127.0.0.1:80
For this to work you must have set your php path correctly.
+ 6
It will be saved with .php and you'll select all file in the type.
+ 4
Its not necessary to use internet connection but you must have download xamp
+ 1
Okay thanks
0
Please see the example:
https://code.sololearn.com/wdMg5lB9T43K/?ref=app