Getting IE6 to render PHP files as HTML?

G

Geoff Hague

This probably isn't the best place to post this question, but I'm sure
someone here knows the answer :)

I'm trying to set up my system so that when I double-click on a .PHP file,
it'll open my default webbrowser (IE6) and display it as an actual webpage.
Unfortunately, all I can get it to do now is open the PHP file in IE, but it
only displays the PHP file source-code, rather than actually rendering it as
HTML.

Anyone know what I'd need to do to fix this?

Thanks!
~Geoff
 
M

Michael Winter

[Rendering PHP as HTML]
Anyone know what I'd need to do to fix this?

You'll have to run the preprocessor on the file, first. This can be done
in three ways:

1) Run it from the command line (not very nice),
2) Use an IDE that, as part of a preview feature, calls the preprocessor
for you, or
3) Run a web server on your machine and connect to localhost.

The Zend Studio client and HTML-Kit are two IDEs that I know of that can
do 2). For 3), you could use any of these free servers[1]: Sambar, Apache,
or IIS. There are bound to be others. Of course, you'll also need PHP
installed, if you don't have it already.

Hope that helps,
Mike


[1] Do be sure to check the licenses before using them.
 
S

Shailesh Humbad

Geoff said:
This probably isn't the best place to post this question, but I'm sure
someone here knows the answer :)

I'm trying to set up my system so that when I double-click on a .PHP file,
it'll open my default webbrowser (IE6) and display it as an actual webpage.
Unfortunately, all I can get it to do now is open the PHP file in IE, but it
only displays the PHP file source-code, rather than actually rendering it as
HTML.

Anyone know what I'd need to do to fix this?

Thanks!
~Geoff
I'm assuming your PHP files are stored in a web directory, such as
c:\inetpub\wwwroot for IIS. If they aren't, then add an IIS virtual
directory to the location where your php files are stored. Make sure
IUSR_machinename has read permissions to the files. Now, get Textpad
from textpad.com and install it. Right-click on any .php file, select
"open with" and "choose program". Choose Textpad and check "always
use this program". In textpad, create a document class for php files.
Check the option for "View in web browser". Go to the Folders
section and set the root folder and ip address for the web server.
Now, when you double click on a .php file, it will open in textpad.
To preview it, all you have to do is click on the globe icon in the
textpad toolbar, which will launch the default web browser. You can
even map a keyboard shortcut.

This is one way to do it that I use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top