php POST 和非英语字符传递为空 [英] php POST and non-english language chars passes empty
问题描述
我正在尝试使用搜索选项对希伯来语站点进行编程.(旧站点,该站点的字符集是 windows-1255)我在 Debian 5 (Lenny) 上使用 Apache 2.2 和 php 5.2启用适当的代码页.
I'm trying to program a Hebrew site with a search option. (old site and the charset of this site is windows-1255) I am using php 5.2 with Apache 2.2, on a Debian 5 (Lenny) with appropriate code pages enabled.
我正在使用 _POST 将参数传递给脚本.如果我通过脚本的英文单词一切正常,但是当我使用希伯来语时POST 函数不传递任何内容.当我使用 ECHO显示_POST,变量为空.
I am using _POST to pass arguments to a script. If I pass English word to the script everything works, but when I use Hebrew nothing is passed through the POST function. When I use ECHO to show _POST, the variable is empty.
可能是什么问题?
附言这是旧网站,在 PHP 4 和 debian 4 上运行良好,问题仅出现在我们升级到 PHP5+debian5 之后.
P.S. this is old site that worked fine on PHP 4 with debian 4, and the problem arised only after we upgrade to PHP5+debian5.
推荐答案
谢谢大家,是我的错
问题解决!
我们有一个类过滤器可以识别 php5 中的那个并运行
we have a class filter that recognize that is in php5 and run
filter_var($this->source[$var], FILTER_SANITIZE_STRING, (FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH));
这会将希伯来字符帖子清理为空.!
and this sanitize the hebrew chars post to empty .!
这篇关于php POST 和非英语字符传递为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!