Jump to content

Ignoring Embedded PHP


Recommended Posts

I have a number of sites that include small amounts of embedded php. The servers the files run on insist that the files are named with the extension php or they won't parse the damn things. I use a number of editors for various editing but I have to admit that the one I like most for entering text in to an already written page is Frontpage. Of course this is a bit lame when it comes to CSS so I was looking forward to Expression Web. Expression Web uses a Preview function that is based on web browsers installed on your PC, and there lies my problem. IE7 will not even attempt to display a file with embedded php. Rather than treating it as HTML and ignoring any PHP, it just displays the source code for the entire file. Oh great. This means that I can't preview any files anymore without first loading them on to the web site. GREAT. Is there a way round this? Any suggestions welcome.
Browsers do not understand PHP code. PHP is a server side programming langauge. Not client side (HTML, CSS, JavaScript are client side and browsers understand these).

What you'll want to do is download a package called WAMP. Once you have this installed you can view page with PHP code in them - in order to do that you need to store these files in WAMP's www folder (C:\WAMP\www) and then you go to http://locaalhost/ to run them.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.