My web page displayed the php code when i test it?

  • Thread starter Thread starter Bryan
  • Start date Start date
B

Bryan

Guest
I used to remember how to solve this but i can't. Is it a missing quotation mark or bracket?
 
Your solution might be:

to save your file with a .php extension. Most people might forget and think that php can be processed in a regular .html file.

OR

Did you view your php file by using its local file address, such as
"file:///C:/WebSite/htdocs/Oops.php"
?
PHP files need to be pre-processed by the server--which only does so when it sees ".php" in a web page's file extension--and hence it stands for "Hypertext Preprocessor."

Other than that, yeah, you might've some coding errors (such as missing quotes on string variable values, variable index names (not numbers), strings, etc.). If, however, you mean the "php code" is the actual code (<?php echo "Displaying this whole code including the php tags?"; ?>), then one of the solutions above this paragraph may be your solution, for your server didn't process your php page.

If you're still stuck you may e-mail me with your whole code and I can help you find your solution!
 
Back
Top