簡體   English   中英

使用tcpdf我有一個錯誤,但找不到

[英]Using tcpdf I have an error but I cant find it

我正在嘗試將html表轉換為pdf,我正在使用TCPDF,但是當我執行它時,網站顯示此錯誤(解析錯誤:語法錯誤,/home2/ecovomxp/public_html/cotizador/pdf.php中出現意外的<<在第87行)有人可以幫助我找到錯誤嗎?

$html = '
<table>
    <thead>
        <tr>
            <th>Tecnología</th>
            <th>Norma de especificación</th>
            <th>Imagen</th>
            <th>Marca</th>
            <th>Modelo</th>
            <th>Descripción</th>
            <th>Precio unitario</th>
            <th>IVA</th>
            <th>Instalación</th>
            <th>Costo total</th>
            <th>Garantía</th>
            <th>Cotizar</th>
        </tr>
    </thead>
    <tbody>';

            $i = 0;
            foreach($records as $r) {

        $html .= '<tr>
            <td>'.<?php echo escape($r->tecnologia); ?>.'</td>
            <td>'.<?php echo escape($r->normaespecificacion); ?>.'</td>
            <td><img src="functions/'.<?php echo escape($r->foto); ?>.'"></td>
            <td>'.<?php echo escape($r->marca); ?>.'</td>
            <td>'.<?php echo escape($r->modelo); ?>.'</td>  
            <td>'.<?php echo escape($r->descripcion); ?>.'</td>
            <td>$'.<?php echo escape($r->preciounitario); ?>.'</td>
            <td>$'.<?php echo escape($r->iva); ?>.'</td>
            <td>$'.<?php echo escape($r->instalacion); ?>.'</td>
            <td>$'.<?php echo escape($r->totalcosto); ?>.'</td>
            <td>'.<?php echo escape($r->garantia); ?>.'</td>
            <td><input type="text" value="0" class="imp"  size="2" /></td>
        </tr>';
            <?php
            $i = $i+1;
            }
            ?>             
    $html .= '</tbody>
</table>';

就像Geoffrey Mureithi所說 -這是語法錯誤-

在此處輸入圖片說明

$i = 0;
foreach($records as $r) {

$html .= '<tr>
    <td>'.escape($r->tecnologia).'</td>
    <td>'.escape($r->normaespecificacion).'</td>
    <td><img src="functions/'.escape($r->foto).'"></td>
    <td>'.escape($r->marca).'</td>
    <td>'.escape($r->modelo).'</td>  
    <td>'.escape($r->descripcion).'</td>
    <td>$'.escape($r->preciounitario).'</td>
    <td>$'.escape($r->iva).'</td>
    <td>$'.escape($r->instalacion).'</td>
    <td>$'.escape($r->totalcosto).'</td>
    <td>'.escape($r->garantia).'</td>
    <td><input type="text" value="0" class="imp"  size="2" /></td>
    </tr>';
    $i = $i+1;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM