I can get my PHP scripts running when they are in .php files.
Is it possible to embed php scripts in .htm files?
I can get my PHP scripts running when they are in .php files.
Is it possible to embed php scripts in .htm files?
Cheers
Billy
If you are running Apache and can use .htaccess, your in luck. Create a new .htaccess file and then in the file save the following:
then you sould be able to embed php in a .html/.htm file.HTML Code:# Make all PHP code look like HTML AddType application/x-httpd-php .htm .html
Thanks for that.
I'll give it a shot
Cheers
Billy
Why do you want to do this?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
So I won't have to change the names of all my pages and laa the links hrefs.
Cheers
Billy
I registerd in this forum to thank you
perfect answer![]()
It makes sense that you would want this, but--
1. You could run a PHP script to rename all .htm files to .php if you'd like.
(Loop through all directories and rename any *.htm to *.php.)
2. If you do override the .htaccess like that, you'll make your server work a bit harder making EVERY .htm file run through the PHP parser when they don't all need to.
Anyway, it's a valid option if these aren't too discouraging.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks