|
Posted by Stephen Johnson on 03/21/05 00:25
You need to setup your apache server to accept and parse .html files as PHP.
Add this line or modify it to look like this in your httpd.conf file.
AddType application/x-httpd-php .php .html .shtml
HTH
<?php
/*
Stephen Johnson c | eh
The Lone Coder
http://www.thelonecoder.com
stephen@thelonecoder.com
562.924.4454 (office)
562.924.4075 (fax)
continuing the struggle against bad code
*/
?>
> From: vijayaraj nagarajan <bioinfovijayaraj@yahoo.com>
> Date: Sun, 20 Mar 2005 14:12:38 -0800 (PST)
> To: php-general@lists.php.net
> Subject: [PHP] php-not-executing-in-html-file-help
>
> hi friends
> i am struggling to solve this problem for the past one
> week...kindly help me..
>
> my apache runs perfectly...
> this code gives a perfect output in the browser...
>
> file name: hi.html
>
> <html><body>
> hihihi
> </body></html>
>
> but this code doesnot give any output in the
> browser...
>
> file name: hi.html
>
> <html><body>
> <?php echo "hihihi"; ?>
> </body></html>
>
> but, the same file with the php code in it...could be
> executed in the command line, using php... where i am
> getting the expected output...
>
> i tested to c if my apache doesnt recognise php ...
>
> this code runs perfectly...in the browser...
>
> <?php echo "hihihi"; ?>
>
> if saved as hi.php file...
> the same code saved as .html, is not giving any output
> in the browser...
>
> kindly help me to figure out this problem...
>
> thanks
>
> vijayaraj nagarajan
> graduate student
> the university of southern mississippi
> MS - USA
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Navigation:
[Reply to this message]
|