[PHP-users 27173] Re: Re HTML FORM 文字化け

Tadashi Jokagi ml @ elf.no-ip.org
2005年 10月 8日 (土) 22:04:59 JST


 上鍵です.こんにちは.
sundara @ cba.att.ne.jpさんの<20051007055411.E00EE197A72 @ smtp2.att.ne.jp>から
>$obj_search_form->applyFilter('__ALL__', 'htmlentities','JIS');
>$obj_search_form->applyFilter('__ALL__', 'htmlentities','SJIS');
>$obj_search_form->applyFilter('__ALL__', 'htmlentities','UTF-8');
>$obj_search_form->applyFilter('__ALL__', 'htmlentities','EUC-JP');

 applyFilter() メソッドの使用法を間違えています.
http://pear.php.net/manual/ja/package.html.html-quickform.html-quickform.applyfilter.php
 そのメソッドには第 3 引数はありません.ユーザー関数を登録し,ユーザー
 関数内で htmlentities() 関数を使用しましょう.
$obj_search_form->applyFilter('__ALL__', 'myhtmlentities');
function myhtmlentities( $value) {
 // 自分のやりたい処理
}
 この辺りは PEAR のインストール先にある HTML/QuickForm.php の
function applyFilter($element, $filter)
function _recursiveFilter($filter, $value)
 辺りを参考にテストしてください.
-- 
----.----1----.----2----.----3----.----4----.----5----.----6----.----7
Tadashi Jokagi/Setagaya city mailto:elf @ elf.no-ip.org
YokukitanaII http://elf.no-ip.org/
Yokukitablog http://blog.poyo.jp/
Yokukitawiki http://wiki.poyo.jp/


PHP-users メーリングリストの案内

AltStyle によって変換されたページ (->オリジナル) /