lpse2000 Posted December 16, 2007 Share Posted December 16, 2007 Hi everyone. I'm brand new to PHP and this forum. The problem I'm having is that I have a .html file with some PHP code in it. Everything displays except what I'm expecting it to out of the PHP code. I assume this is more of a server problem than a problem in my PHP script because if a file only has PHP code in it, it displays perfectly. Here's my code. <html> <head> <title>Test PHP and HTML</title> </head> <body> <h1>Test Test</h1> <?php echo "<b> test </b> test"; ?> that's all folks </body> Anyone here run into this before or know where I should look into? Thanks, Michael Quote Link to comment Share on other sites More sharing options...
AntiScourge Posted December 16, 2007 Share Posted December 16, 2007 The extension on the file must be .php so that the server knows to process the file before sending it to the browser. *edit* to expand on that. All processing of PHP code is done server-side. Any PHP that's not processed when sent to the browser is just dropped, as browsers don't have the ability to process it. Quote Link to comment Share on other sites More sharing options...
lpse2000 Posted December 16, 2007 Author Share Posted December 16, 2007 Ahhh, it worked! That simple huh? Thanks much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.