PHP PHP Basics Getting to Know PHP PHP Comments

When I run a php block in the console, it doesn't show the output

How can I get the console to show the output after typing "php <file name>.php" ?

Michael Cockrell
Michael Cockrell
Pro Student 542 Points

or just read the 5000 other questions asking the same thing that give the exact same answer.

1 Answer

Amy Kelly
Amy Kelly
3,588 Points
  1. First make sure that the document is saved (if it is not saved it will have a red dot by the file name at the top)
  2. Save it by clicking ctrl s or by going to file then save.
  3. Then go into the console and type php <file name>.php and enter. The amount of times I have gone to run the code but it doesn't appear as I haven't saved the file :)