Home >Backend Development >PHP Tutorial >PHPMaker7 cannot get the value when editing in Chinese_PHP tutorial

PHPMaker7 cannot get the value when editing in Chinese_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:53:411161browse

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
If the field region content is in Chinese, click Edit in the generated CRUD code and the field content will not be displayed.

Open phpfn7.php to find the function ew_HtmlEncode

1
function ew_HtmlEncode($exp) {
2
          return htmlspecialchars(strval($exp));
3
}
Modify this function
1
function ew_HtmlEncode($exp) {
2
          return htmlspecialchars(strval($exp), ENT_COMPAT, "GB2312");
3
}
Save the test and the problem is solved.


Author: huzorro

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478009.htmlTechArticle01 *********************** **** 1. row *************************** 02 Table: zone_allow 03 Create Table: CREATE TABLE `zone_allow` ( 04 ` id` int(11) NOT NULL AUTO_INCREMENT, 05 `spc...
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