本帖最后由 dxh_0829 于 2011-09-19 10:45:30 编辑

解决方案 »

  1.   

    报什么错了。要截取字符长度用mb_系列函数strlen
    ==>
    my_strlen()
    mysubstr
    ==>
    mb_substr()  //两个函数都要加上编码
      

  2.   

    Parse error: syntax error, unexpected T_IF in D:\AppServ\www\shangcheng11-8-29\union\index.php on line 50
    50行是:$rtl && if(strlen($rtl['page_body'])>792)
      

  3.   

    if($member_file['sellshow']==1)    //展示型
    {
        $q=$db->query("SELECT * FROM `{$tablepre}certi` WHERE supplier_id='$page_member_id' ORDER BY uid DESC LIMIT 3");
        while($rtl=$db->fetch_array($q)) $certi[]=$rtl;
        
        $rtl=$db->get_one("SELECT page_body FROM `{$tablepre}page_table` WHERE supplier_id='$page_member_id' AND page_name='shopdesc'");
        $rtl && (strlen($rtl['page_body']>792))//这里的if是错的。改为if($rtl && (strlen($rtl['page_body']>792))
        {
            $detail=str_replace(" ","",mysubstr(strip_tags($rtl['page_body']),0,792))."...";
        } else
        {
            $detail=str_replace(" ","",strip_tags($rtl['page_body']))
            }
        
        $detail_url=GetBaseUrl('page','shopdesc','action','1',$page_member_id);
    }
      

  4.   

    还是报错啊!!
    Parse error: syntax error, unexpected '}' in D:\AppServ\www\shangcheng11-8-29\union\index.php on line 55
      

  5.   

    else
        {
            $detail=str_replace(" ","",strip_tags($rtl['page_body']))这个后面少了个;
    谢谢啦!大哥