[PHP] simple config. question
Hi, I'm a newbie with PHP and have successfully written some simple scripts. I am using Apache on Redhat Linux 6.2 with PHP 3. At the moment, I have to give .php3 extensions ot my web files in order for PHP to run. If I insert PHP code into an .html file, it does not execute. Is their a way to configure PHP to execute from .html files? P.S. As I write this, I don't discount the possibility of this being an Apache config. If so, I apologize for posting to this list. Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple config. question
Unless I am mistaken, I am pretty sure you need to have sometype of .php extension. Unless you could put a line in the httpd.conf file like: AddType application/x-httpd-php .html BUT, I HAVE NEVER DONE THIS SO PLEASE WAIT FOR A MORE EDUCATED ANSWER. - Shane - Original Message - From: "Don" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 05, 2001 2:03 PM Subject: [PHP] simple config. question Hi, I'm a newbie with PHP and have successfully written some simple scripts. I am using Apache on Redhat Linux 6.2 with PHP 3. At the moment, I have to give .php3 extensions ot my web files in order for PHP to run. If I insert PHP code into an .html file, it does not execute. Is their a way to configure PHP to execute from .html files? P.S. As I write this, I don't discount the possibility of this being an Apache config. If so, I apologize for posting to this list. Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple config. question
On Monday 05 February 2001 20:14, Shane McBride wrote: Unless I am mistaken, I am pretty sure you need to have sometype of .php extension. Unless you could put a line in the httpd.conf file like: AddType application/x-httpd-php .html Well, that's exactly the right way :) Perhaps a more "generous" setup would be even better though: AddType application/x-httpd-php .html .htm .php3 .php .phtml -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) (A)bort (R)etry (P)retend this never happened ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple config. question
Christian, Wouldn't this put unnecessary load on the webserver? Every .htm and .html document, even if it doesn't contain any line of PHP code, would go through the parser... ? "Christian Reiniger" [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] On Monday 05 February 2001 20:14, Shane McBride wrote: Unless I am mistaken, I am pretty sure you need to have sometype of .php extension. Unless you could put a line in the httpd.conf file like: AddType application/x-httpd-php .html Well, that's exactly the right way :) Perhaps a more "generous" setup would be even better though: AddType application/x-httpd-php .html .htm .php3 .php .phtml -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) (A)bort (R)etry (P)retend this never happened ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]