Page 1 of 1

browser displays PHP as a plain text

PostPosted: 22. May 2013 11:46
by wallbridge13
Hi there. New to PHP, HTML, Apache and Xampp et al. But learning fast - managed to turn on PC this morning!!

I'm having the same problem as Asaf but your suggestions don't seem to work for me.

Any help out there?

Thank you.

[edit by Altrea: splitted from original thread: One thread per unique user and issue rule]

Re: browser displays PHP as a plain text

PostPosted: 22. May 2013 16:24
by Altrea
Hi wallbridge13,

Without any information about how you open the file, what url your browser address bar shows, what "php plain text" output you get and what sourcecode your php file has it is difficult to guess what your issue is.

The most common "php don't get parsed issues":
  • Using short_open_tag
  • wrong Browser request (file:// instead of http:// protocol)
  • File extension .html instead of .php
  • wrong encoding (UTF8 with instead of without ByteOrderMark, UCS2 or other Multibyte- or other non-ANSI character encodings)

best wishes,
Altrea