Jump to content
The Uniform Server Community

embeding PHP into HTML


Tung_meister
 Share

Recommended Posts

No he is talking about embedding php into HTML... there is a way to do that using either the .html extension or .phtml :(

 

Check those config files :D

Link to comment
Share on other sites

For those who want to have this feature, there is a simple shortcut and it dosen't require to cahnge your http.conf. Just add this line to the .htaccess file:

 

addtype application/x-httpd-php .html .htm .bla

 

You can add wathever you might want to, even something crazy, like .bla, your name or your nickname.

 

In other words, personlize your site. If you do have.... personality. :(

Link to comment
Share on other sites

If needed server-wide:

I'd say in W:\usr\local\apache2\conf\httpd.conf

Find:

AddType application/x-httpd-php .phtml .php3 .php

Edit line to read

AddType application/x-httpd-php .phtml .php3 .php .html .htm

 

If needed in one or more folders: Use gopo's method, add them via .htaccess

 

 

But I need to point out the security risk associated with this method!

 

Any upload script should probably be updated to see the newly defined files as executables too, and treat them with the same care as .php files are given. Most to me known PHP upload systems see .html files as a kind of documents, and that may be dangerous.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...