-1

I've been learning PHP (on windows) for a week, making simple code that were showed normaly on the browser (with echo) with my local server using php -S localhost:8080. Since adding composer, my browser is just displaying my php code instead of the application.

I've checked this question that had the similar problem to mine but the problem still remains.

Note: I'm not using xamp.

Edit: my locahost looks like this

enter image description here

PedroSG
  • 555
  • 1
  • 6
  • 30

2 Answers2

1

You might have saved the file name as filename.html instead of .php? How do you save it?

AbramYu
  • 17
  • 7
0

I misunderstood an answer in this question. I was using short tag <? in the begining of the file but the exact way is to use like <?php .

Now, everything is working fine!

PedroSG
  • 555
  • 1
  • 6
  • 30