can not run .php file directly...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
swayam07
Forum Newbie
Posts: 2
Joined: Fri Jun 05, 2009 1:50 pm

can not run .php file directly...

Post by swayam07 »

I am new to PHP. I just installed IIS 5.1 and PHP 4.2.3 on Windows XP.
I created a new file 'myfirst.php' in 'C:\Inetpub\wwwroot' with code -

Code: Select all

<?php echo "Hello"; ?>
Now, when I enter 'http://localhost/myfirst.php' in the browser, the output is - 'Hello' in the browser.
But, when I double-click the file icon the code is displayed as it is in the browser.

How can I get the correct output? Is there some problem in linking with IIS? Please help.
quick5pnt0
Forum Newbie
Posts: 3
Joined: Fri Jun 05, 2009 12:43 pm

Re: can not run .php file directly...

Post by quick5pnt0 »

That's normal. Php is a server side language which means the server has to interpret it. By double clicking the file you are bypassing the server.
swayam07
Forum Newbie
Posts: 2
Joined: Fri Jun 05, 2009 1:50 pm

Re: can not run .php file directly...

Post by swayam07 »

quick5pnt0 wrote:That's normal. Php is a server side language which means the server has to interpret it. By double clicking the file you are bypassing the server.
Thanks for reply...
Post Reply