Re: why php echo does not show up in HTML? [message #181637 is a reply to message #181632] |
Fri, 24 May 2013 14:19 |
steve nospam
Messages: 11 Registered: May 2013
Karma:
|
Junior Member |
|
|
>
> You get your:
>
> AddType application/x-httpd-php .htm
>
> added to the apache config file on the server.
>
What I did is add the above line to my .htaccess file on my home page.
And it worked for apache server on my PC. But when I did the same for
my hosting company, then what happens when I clicked on the file, the
browser was asking me to download the .htm file ! instead of opening
it
as a web page.
Do you think I need to add the above line to apache config file? But
my hosting company is public company, I have no control over what web
server they are using and I can't ask them to edit the web server
config files for me. This is a shared server.
> However, you should note if if you do that, any .htm file will be sent
> to PHP by apache, even if there is no PHP in it. That adds an extra step
> to getting your files served up. That is why people have been suggesting
> to change the files which use PHP to have a .php extension.
>
It is not the delay isssue. It simply did not work as I said above.
> Personally I add:
>
> AddType application/x-httpd-php .phtml
>
> to the apache config file, and use that for files containing any PHP.
> That way the PHP interpreter is only involved when a file actually has
> PHP in it.
>
I can't edit the web server config files on the my hosting ISP
computer !
|
|
|