Re: why php echo does not show up in HTML? [message #181652 is a reply to message #181627] |
Fri, 24 May 2013 15:51 |
Peter H. Coffin
Messages: 245 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Fri, 24 May 2013 06:20:03 -0700 (PDT), steve nospam wrote:
>
>>
>> I found the problem.
>>
>> I needed to modify the .htaccess file. added this line
>>
>> AddType application/x-httpd-php .htm
>>
>> Now it works. php works from inside htm file. No need to change file
>> extension.
>
> guys, the above fix did not work on the server. Must be something with
> the php used there. It worked on my local apache server.
The server configuration may be forbidding FileInfo overrides from
..htaccess. In newer Apache versions, allowing this by default is no
longer the case, either.
> So, I still
> looking for a solution. My question is this:
>
> If I change my index.htm to index.php, is there a way to make an alias
> or something so that not all my links are broken? so that a link to
> index.htm will use index.php?
No. What handler the Apache server uses for type depends on the name.
You cannot use a different thing in the name than what the server is
looking for and get it to work.
--
"It's 106 light-years to Chicago, we've got a full chamber of anti-
matter, a half a pack of cigarettes, it's dark, and we're wearing
visors."
"Engage."
|
|
|