Home >php教程 >php手册 >PHPMaker7 中文编辑的时候取不到值

PHPMaker7 中文编辑的时候取不到值

WBOY
WBOYOriginal
2016-06-13 10:52:041136browse

01
*************************** 1. row ***************************
02
       Table: zone_allow
03
Create Table: CREATE TABLE `zone_allow` (
04
  `id` int(11) NOT NULL AUTO_INCREMENT,
05
  `spcode` varchar(30) NOT NULL DEFAULT '',
06
  `region` varchar(255) NOT NULL DEFAULT '',
07
  `type` varchar(30) NOT NULL DEFAULT '',
08
  `total` int(11) NOT NULL,
09
  `status` int(2) NOT NULL DEFAULT '1',
10
  `logtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
11
  PRIMARY KEY (`id`)
12
) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=gbk
字段region内容是中文的情况下,在生成的CRUD代码中, 点编辑,该字段内容不显示。

打开phpfn7.php查找函数 ew_HtmlEncode

1
function ew_HtmlEncode($exp) {
2
        return htmlspecialchars(strval($exp));
3
}
修改该函数
1
function ew_HtmlEncode($exp) {
2
        return htmlspecialchars(strval($exp), ENT_COMPAT,  "GB2312");
3
}
保存测试,问题解决。
 


作者:huzorro
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn