How to run a php file? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to run a php file?

I am almost done the basics of PHP and I want to know how to test a php file on visual studio code, which is what I use. How do I actually run and compile it?

15th Jun 2018, 1:14 AM
Kyle
Kyle - avatar
1 Answer
+ 1
If you have PHP installed on your system - run "php myfile.php", myfile.php is your file name obviously. To run the build-in server run "php -S localhost:8080" inside of a directory. You can do this inside vscode's terminal.
15th Jun 2018, 5:02 AM
spotbot2k
spotbot2k - avatar