163tom 发表于 2010-6-4 15:41:56

火车头发布模块成功后,我增加3个标签,用接口文件post提示字符转换错误

火车头发布模块成功后,我增加3个标签,用接口文件post提示字符转换错误,post接口文件获取不到数据 &smallpic=[标签:smallpic]&bigpic=[标签:bigpic]


&thumbnail=[标签:thumbnail]错误日志如下:
<br />
<b>Parse error</b>:parse error in <b>shopex_kk580_utf8.php</b> on line <b>159</b><br />

模块增加3个标签:&smallpic=[标签:smallpic]&bigpic=[标签:bigpic]&thumbnail=[标签:thumbnail]在发布成功的基础上,测试标签也取得数据,fom_img_path方法没问题 ,错误在159行 for的循环内   $arysmall[$i]=fom_img_path($arraysmall[$i]);


代码如下:
$smallpic = $_POST['smallpic'];       
$bigpic = $_POST['bigpic'];       
$thumbnail = $_POST['thumbnail'];       

$smallpic="http://www.kk580.com/images/goods/20100423/2840f09dcc80face.jpg|||http://www.kk580.com/images/goods/20100423/f5d5c31d78829a8a.jpg|||http://www.kk580.com/images/goods/20100423/7f41805b1258f3d1.jpg|||http://www.kk580.com/images/goods/20100423/c814c138c2913c29.jpg|||http://www.kk580.com/images/goods/20100423/b0f3851fc8f36431.jpg|||http://www.kk580.com/images/goods/20100423/b7b1c02cfb12a518.jpg";

$smallpic=trim($smallpic);
    $bigpic=trim($bigpic);
          $thumbnail=trim($thumbnail);

$arraysmall=explode("|||", $smallpic);
$arraybigpic=explode("|||", $bigpic);
$arraythumbnail=explode("|||", $thumbnail);
   
for($i=0;$i<count($arraysmall);$i++)
        {
       
           $arysmall[$i]=fom_img_path($arraysmall[$i]);
                $arybigpic[$i]=fom_img_path($arraybigpic[$i]);
                $arraythumbnail[$i]=fom_img_path($arraythumbnail[$i]);
             }

zhouchanglin 发表于 2010-10-27 16:03:13

联系我吧972130397,火车论坛能学到了很多,有很多热心的朋友和版主,希望locoy论坛越来越好
页: [1]
查看完整版本: 火车头发布模块成功后,我增加3个标签,用接口文件post提示字符转换错误