Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/08/2012, 12:24
vito25
 
Fecha de Ingreso: marzo-2008
Mensajes: 63
Antigüedad: 16 años, 1 mes
Puntos: 0
Pagina dinamica con HTML2PDF error

Estoy generando reportes en pdf con HTML2PDF . El problema es que al intentar crear un pdf a partir de una url dinamica me da el siguiente error:

Código PHP:
Warning: include(C:xampphtdocsinfo/ot2.php?ot=1208) [function.include]: failed to open streamNo error in

C
:xampphtdocsinfopdf.php on line 21
Warning
: include() [function.include]: Failed opening 'C:\xampp\htdocs\info/ot2.php?ot=1208' for inclusion
(include_path='.;C:\xampp\php\PEAR'in C:xampphtdocsinfopdf.php on line 21 

el archivo pdf.php tiene el siguiente codigo:

Código PHP:
<?php
$_GET
['ot'] = 1208;
//$ot = 1208;


 
HTML2PDF Librairy example
//$url = "/ot2.php?ot=1208";
    // get the HTML
    
ob_start();
    include(
dirname(__FILE__).'/ot2.php?ot='1208);
    
$content ob_get_clean();

    
// convert in PDF
    
require_once(dirname(__FILE__).'/html2pdf.class.php');
    try
    {
        
$html2pdf = new HTML2PDF('A4''C''es');
         
      
//$html2pdf->setModeDebug();
        //$html2pdf->setDefaultFont('Arial');
        
$html2pdf->writeHTML($content);
        
$html2pdf->Output('pdf.pdf');
    }
    catch(
HTML2PDF_exception $e) {
        echo 
$e;
        exit;
    }
?>

Si cambio la ruta dinamica por "ot2.php" el pdf se genera de forma normal.


Alguien sabe que puede estar pasando y porque no permite generar un pdf?




Saludos