Page 1 of 1

can not run .php file directly...

Posted: Fri Jun 05, 2009 2:03 pm
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.

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

Posted: Fri Jun 05, 2009 2:28 pm
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.

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

Posted: Sat Jun 06, 2009 12:20 am
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...