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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.