Re: need to get .html files parsed by PHP. -- WAS: why does PHP parse "*.html" files in one subdir/ but not in another?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 19, 2009 at 2:53 AM, Ashley
Sheridan<ash@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 2009-07-18 at 23:09 -0600, Govinda wrote:
>> > i never used x-mapp-php5, but most of a forums say it is specific to
>> > 1and1 hosting service. php recommends application/x-httpd-php
>> >
>> > http://us2.php.net/manual/en/install.unix.apache2.php
>> >
>> > try adding AddType application/x-httpd-php .html in your root htaccess
>>
>> hmmm.   Darn!   I just did try what you suggested above.  Still no luck.
>>
>> > if that dosent help you'll have to add that to your htpd.conf file
>>
>> I am guessing that this means that I am outta luck since I am on a
>> shared hosting environment and assume I do not have access to
>> httpd.conf.
>>
>> Agreed?
>>
>> > It sounds like your .htaccess file may be telling .html files in a /
>> > sub/directory/ to treat .html files as .php
>>
>> I'm sorry I misled everyone.  I just looked better at things and .html
>> files are NOT getting their PHP parsed...  *not anywhere*.   So I
>> assume then that it IS an httpd.conf issue.  (?)   ...and only the
>> host admin can turn this on for me?  (Because if it is something I
>> have control over he is going to give me a hard time ;-)
>>
>> -G
>>
> Generally, if a file has a .html extenstion, then it should really just
> contain html. .php extensions are meant for php code containing html.
>
> Thanks
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

File extension has absolutely no bearing at all on the contents of the
file.  There's valid reasons to not expose what's what under the hood,
especially if there happen to be known exploits in the latest version
of PHP that week.  God forbid that that happens, but it does every so
often.  File mime-type being determined by an extension is entirely M$
Windows mentality and doesn't really extend to *nix environments,
where most of us are hosting our sites, anyway.  You could name your
scripts whatever you want, .awesome, .refridgerator, .silver, whatever
and it'd have no bearing on the files themselves.  It's certainly the
de-factor standard that .html files only contain flat markup, but
that's by no means a rule or anything, but it's common practice
(mostly because programmers are lazy).

Sorry if I sound rude, just quit smoking :)
--Eddie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux