You are here: Re: [PHP] Japanese with UTF-8 and mysql « PHP « IT news, forums, messages
Re: [PHP] Japanese with UTF-8 and mysql

Posted by "Richard Lynch" on 06/09/05 04:25

On Mon, June 6, 2005 11:02 pm, Mark Sargent said:
>>> The correct way - if one wants utf-8 as charset - is:
>>> header("Content-Type: index/html; charset=utf-8");

> actually, if I add this,
>
> header("Content-Type: index/html; charset=utf-8");
>
> as suggested, firefox prompts to download the page, instead of just
> displaying the page.
>
> You have chosen to open
> productdetails.php
> which is a : PHP file
> from: http://localhost/
> What should firefox do with this file?
> Open with Browse..
> Save to disk
>
> Weird, what's with that. Cheers.

Sigh.

I think they implemented the IE bug that looks at URLs instead of Headers
in some cases.

Rename your PHP script to be .htm, and then use .htaccess with ForceType
to make it really be a PHP script.

<Files productdetails.htm>
ForceType application/x-httpd-php
</Files>

Then the browser CAN NOT KNOW you used PHP to generate the file, so cannot
possibly screw up...

Well, at least it can't screw up in the way it is doing now. :-)

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация