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)
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'])) }
==>
my_strlen()
mysubstr
==>
mb_substr() //两个函数都要加上编码
50行是:$rtl && if(strlen($rtl['page_body'])>792)
{
$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);
}
Parse error: syntax error, unexpected '}' in D:\AppServ\www\shangcheng11-8-29\union\index.php on line 55
{
$detail=str_replace(" ","",strip_tags($rtl['page_body']))这个后面少了个;
谢谢啦!大哥