PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of Angel Alberto Briceño Obregón   PHP Reporting Library   example1.php   Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Reporting Library
Generate reports with database data
Author: By
Last change:
Date: 7 years ago
Size: 600 bytes
 

Contents

Class file image Download
<?php
require_once('ReportLib/autoload.php');

$Reporte = new ReportLib();
$Reporte->formatSource["tipo"] = "file";
$Reporte->formatSource["sourcelocation"] = "Formato1.json";
//$Reporte->setVariables(
// "clave: contraseña", "campo: valor", "numero: 56", "tema: psicologia"
//);
$Reporte->setVariables("fecha_inicio: $Reporte->datenow");
$Reporte->formVariables();
$Reporte->CargarFormato();
if (
$link = mysqli_connect("thedbhost", "userdb", "thepassword", "thedbname", "3306")) {
   
$Reporte->LoadData($link);
} else {
    echo
"No podemos conectarnos.\n";
    exit;
}

$Reporte->ToPrint();