RE: [PHP] PHP within .html files

From: Date: Thu, 16 Aug 2001 15:50:54 +0000
Subject: RE: [PHP] PHP within .html files
Groups: php.general 
Request: Send a blank email to php-general+get-63049@lists.php.net to get a copy of this message
Apache can be set up to parse whatever files you like as .php (you could have .paul if you like...) - presumably your host has enabled this. If you have access to .htaccess files (or the main server config, httpd.conf), you can set this up on any Apache server with the line AddType application/x-httpd-php .php .html You can put as many extensions as you like in there, for example: AddType application/x-httpd-php .php .php3 .php4 .html .phtml .foo .bar .baz .xyzzy Although this is probably overkill :-) HTH Jon -----Original Message----- From: Paul S. [mailto:paul.s@interport.net] Sent: 16 August 2001 16:29 To: php-general@lists.php.net Subject: [PHP] PHP within .html files My UNIX apache server that I host from seems to be preset to execute PHP code within html docs. That is, a php require statement within a ".html" file is included, executed, and sent to the browser. Is this unusual? or standard? I ask because I would hope not to become dependent on including php code in html docs and have them switch a server setting back. Of course, if that happens I guess I could rename my files from ".html" to ".php". But I really prefer to just having ".html" appear in the browser URL bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#63049) next »