FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » why php echo does not show up in HTML?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: why php echo does not show up in HTML? [message #181672 is a reply to message #181646] Fri, 24 May 2013 22:37 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Fri, 24 May 2013 15:02:47 +0000, Doug Miller wrote:

> steve nospam <steve(dot)nospamm(at)gmail(dot)com> wrote in
> news:d52747cd-b74d-4242-8ffe- ef95fe376a68(at)g3g2000yqg(dot)googlegroups(dot)com:

>>> AddType application/x-httpd-php .htm

>> What I did is add the above line to my .htaccess file on my home page.

> Wrong place. As Tim told you, you need to add this to the Apache config
> file.

>> And it worked for apache server on my PC.

It may depend on the security settings in the config file. See the docs:

http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype

Context: server config, virtual host, directory, .htaccess

and:

http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

"When this directive is set to All, then any directive which has
the .htaccess Context is allowed in .htaccess files."

If he has "allowoverride all" (or anything else that allows an addtype in
an .htaccess) specified in a the relevant <directory> section of the
apache conf, then inserting addtype in the .htaccess will work as he
describes.

If he wants it to work on the server, he has to convince the server admins
to:

allowoverride fileinfo

for his directory(ies), but the server admins will most likely be very
reluctant to do that because what he intends to do is going to increase
cpu load on the server by sending all his html files through the php
preprocessor.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP Contact Form, mt-rand(), problem Validating 1 input
Next Topic: Parsing mbox files with Windows Php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Feb 17 13:05:38 GMT 2025

Total time taken to generate the page: 0.07728 seconds