What is the following sentence? This post was last edited by tp_2016 from 2015-05-1920: 06: 10 if & nbsp; (strtoupper (CHARSET) & nbsp; GBK & nbsp; & amp; & nbsp ;! Empty ($ key) {if & nbsp; (is_array ($ ke
This post was last edited by tp_2016 at 20:06:10
If (strtoupper (CHARSET) = 'gbk '&&! Empty ($ key )){
If (is_array ($ key )){
$ Result = var_export ($ key, true); // Convert it to a string
$ Result = iconv ('utf-8', 'gbk', $ result );
Eval ("\ $ result = $ result;"); // convert back to array
} Else {
$ Result = iconv ('utf-8', 'gbk', $ key );
}
}
Return $ result;
What does CHARSET in this sentence mean? Incredible. Is it a real test string?
And eval ("\ $ result = $ result;"); why can it be converted to an array?
------ Solution ----------------------
CHARSET is a constant.
The eval () function calculates the string according to the PHP code. Let's take a look at the introduction of this function in the manual.
------ Solution ----------------------
CHARSET is a constant. you can find the define ('charset', xxx); definition.
Eval is to convert the string into code for execution.