Home > php教程 > php手册 > body text

php乱码,该怎么解决

WBOY
Release: 2016-06-06 19:43:10
Original
1265 people have browsed it

php乱码 define('ACC',true); 【本文来自鸿网互联 (http://www.68idc.cn)】require('../include/init.php'); //print_r($_POST); $goods=newGoodsModel(); $_POST['goods_weight']*=$_POST['weight_unit']; //print_r($_POST); $data=array(); $data=$goods-_

php乱码
define('ACC',true);
【本文来自鸿网互联 (http://www.68idc.cn)】require('../include/init.php');

//print_r($_POST);
$goods = new GoodsModel();
$_POST['goods_weight'] *=$_POST['weight_unit'];
//print_r($_POST);
$data = array();
$data =  $goods->_facade($_POST);//自动过滤没有参数的字段
$data = $goods->_autoFill($data); // 自动填充

//print_r($data);
//exit;
if(!$goods->_validate($data)) {
    echo '数据不合法
';
    echo implode(',',$goods->getErr());
    exit;
}

$uptool = new UpTool();
$ori_img=$uptool->up('ori_img');

if($ori_img){
$data['ori_img'] = $ori_img;
}

if($goods->add($data)){
echo '商品发布成功';
}else{
echo '商品发布失败';
}
//print_r($data);
?>


输出的时候出现"数据不合法"输出是正常的但是商品发布失败就会乱码 ,在同一个echo页面 一个乱码一个不乱码 这个怎么调啊

------解决思路----------------------
这要看 $goods->add 里面还做了些什么
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template