$pdf->Write(0, 'From : Unit A1 , 7/F,Cheung Kong Factory Bldg , 6 Cheung Yee Street , Lai Chi Kok , Hong Kong', '', 0, 'L', true, 0, false, false, 0);请问这个'From : Unit A1 , 7/F,Cheung Kong Factory Bldg , 6 Cheung Yee Street , Lai Chi Kok , Hong Kong'有什么问题吗?用其它字符就没有问题,一用这段字段,网页就打不开

解决方案 »

  1.   

     $Sql_hkpdf = "SELECT * , group_concat( '  ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , '  ' ),group_concat('  ' , `order_id` , '  ') FROM ( select * from `sale_orders` order by `sku`) T WHERE `shipments` =0 AND `number` =$id AND `delivery_areas` ='HK' GROUP BY `recipient-name` , `ship-address-1` ORDER BY length(group_concat( ' ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , ' ' )) DESC,`sku`"; 
     $Result = mysql_query($Sql_hkpdf);
      while($rs = mysql_fetch_array($Result) ){
     
    $ship_address=$rs['ship-address-1'].$rs['ship-address-2'].$rs['ship-address-3'];
    $sku=$rs["group_concat( '  ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , '  ' )"];
    $ship_postal_code="〒".$rs['ship-postal-code'];$ship_city=$rs['ship-state']." ".$rs['ship-city'];
    $recipient_name=$rs['recipient-name'];
    $buyer_phone_number='電話:'.$rs['buyer-phone-number'];
     
    $pdf->AddPage();
    $pdf->SetFont('arialunicid0', '', 7);
    $pdf->Write(0, $sku, '', 0, 'R', true, 0, false, false, 0);
    $yy=$pdf->GetY();
    $xx=$pdf->GetX();
    $style = array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
    $pdf->Line(2, $yy+0.3, 89, $yy+0.3, $style);
    $pdf->SetFont('arialunicid0', '', 10);
    $pdf->Write(0, $ship_postal_code, '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, "\n", '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, $ship_city, '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, $ship_address, '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, "\n", '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, $recipient_name, '', 0, 'C', true, 0, false, false, 0);
    $pdf->Write(0, $buyer_phone_number, '', 0, 'C', true, 0, false, false, 0);
    $pdf->Write(0, "\n", '', 0, 'L', true, 0, false, false, 0);
    $pdf->Line(2, 50, 89, 50, $style);
    $pdf->SetXY(3,50);
    $pdf->SetFont('arialunicid0', '', 7);
    //$pdf->Write(0, 'From : Unit A1 , 7/F,Cheung Kong Factory Bldg , 6 Cheung Yee Street , Lai Chi Kok , Hong Kong', '', 0, 'L', true, 0, false, false, 0);
    $pdf->Write(0, 'From : Unit A1 , 7/F,Cheung Kong Factory Bldg , 6 Cheung Yee Street , Lai Chi Kok , Hong Kong', '', 0, 'L', true, 0, false, false, 0);
    $style1 = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));
    $pdf->Line(1, 1, 90, 1, $style1);
    $pdf->Line(1, 54, 90, 54, $style1);
    $pdf->Line(1, 1, 1, 54, $style1);
    $pdf->Line(90, 1, 90, 54, $style1);
    }$pdf->Output($filenamepdf, 'F');