PHP only showing up as text instead of executing

Hello, I’m brand new to learning PHP. I picked up a book the other day and I’m going through the chapters. As of yesterday PHP worked perfectly fine and I was able to finish the first chapter of the book but now for some reason the PHP is no longer executing on the Apache server like it was yesterday. It is now just showing the PHP when I try to use it.

Does anyone know what this problem could be or can anyone at least help me try to figure out what’s causing this. I would really appreciate it. Thank you very much.

Now the weird part is that when I run <? phpinfo(); ?> in a PHP file it shows up perfectly fine but when I run anything else it just shows the text as I described before. So my PHP is working with Apache but it’s not working for some reason.

Sponsor our Newsletter | Privacy Policy | Terms of Service