When the following file, tmp.htm, is executed no output is produced.
<html> <head> <title>Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php echo '<p>hello world</p>'; ?> </body> </html>
However, when the name of the file is changed to tmp.php the expected output, 'hello world', is obtained. Is this the correct behavior? More specifically, is the php script not executed?
Cheers,
That is the conventional behavior, yes. If you want PHP to be invoked on files with an .html extension, you can (assuming you use Apache) change the line in httpd.conf that looks like this
AddType application/x-httpd-php3 .php
to this
AddType application/x-httpd-php3 .php .html
See
http://www.php.net/manual/en/install.apache.php
for more info.
steve
-- +--------------- my people are the people of the dessert, ---------------+ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | +---------------- said t e lawrence, picking up his fork ----------------+
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php