Html2pdf library problem with web server

1

Someone of you had problems with servers when implementing the library html2pdf

Localhost works perfectly, but when uploading to the server it does not work, someone could guide me

annex the following

  <?php
  require_once "funciones.php";
  $link = Conectarse();
  $idform = $_GET['idform'];
  $sql = sprintf("SELECT * FROM formato WHERE id = '%s'",$idform);
  $formato = $link->query($sql);
  $formato = mysqli_fetch_assoc($formato);
  $mes = array("01"=>"ENERO", "02"=>"FEBRERO", "03"=>"MARZO", "04"=>"ABRIL", "05"=>"MAYO", "06"=>"JUNIO", "07"=>"JULIO", "08"=>"AGOSTO", "09"=>"SEPTIEMBRE", "10"=>"OCTUBRE", "11"=>"NOVIEMBRE", "12"=>"DICIEMBRE");
  $sql1 = "SELECT nombre FROM cog where id ='".$formato['id_cog']."'";
  $result = $link->query($sql1);
  $desc = mysqli_fetch_assoc($result);
  #Contenido x
  $sql2 = "SELECT nombre,director FROM oficinas where  id ='".$formato['id_oficina']."'";
  $result1=$link->query($sql2);
  $datos = mysqli_fetch_assoc($result1);
    require_once('/pdf/html2pdfclass.php');
    $html2pdf = new HTML2PDF('P','A4','es','UTF-8');
    $html2pdf->WriteHTML($content);
    $html2pdf->Output('factura_comprometido.pdf');
?>

** I appreciate your recommendations or if someone knows a bookstore that works better **

    
asked by harriroot 28.03.2016 в 19:55
source

1 answer

1

Something tells me that the error could be here:

require_once "funciones.php";
require_once('/pdf/html2pdfclass.php');

Check if the file funciones.php or html2pdfclass.php is being called in the path you specify.

Greetings.

    
answered by 28.03.2016 в 20:14