Re: [Q] PHP code embedded in html files - What happens?

From: Date: Mon, 15 Mar 2004 02:14:33 +0000
Subject: Re: [Q] PHP code embedded in html files - What happens?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180405@lists.php.net to get a copy of this message
Hi Michael, In my understanding, web server will involve php interpreter when the file extension is specify. Say, if a web server is configured to involve php interpreter when the extension is php, then when the request file is php, the php file's content will be interpreted. So, I think your web server is configured like this. I believe it's normal behaviour in your case. Please correct me if I've made anything wrong, thanks. Cheers, Jeffrey "Michael T. Peterson" <mtp1032@comcast.net> ¦b¶l¥ó news:c332q3$lh8$1@sea.gmane.org ¤¤¼¶¼g... > 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, > > Michael

« previous php.general (#180405) next »