调用源码
php code$obj_car = new class_car;$num_carid = $obj_car->fn_caradd($_post);
类源码
php codeclass class_car { function fn_caradd($arr_post) { print_r($arr_post); }}
这样可以正常输出数组
php codearray( [action_post] => caradd [str_postchk] => [str_carname] => 高尔夫 [num_carbrand] => 7 [num_carmodel] => 615 [str_caremiss] => 1.4t [str_cartrans] => mt)
类源码
php codeclass class_car { function fn_caradd($arr_post) { print_r($arr_post[str_carname]); }}
这样输出乱码,求解,文件本身编码都没问题
------解决方案--------------------
header发送编码。
加在程序开始就行了。
header('content-type:text/html; charset=utf-8');
