Exemplo n.º 1
0
 /**
  * The method which will be called from  outside for creating the DBF and FPT (if required) files.
  */
 function writedata()
 {
     try {
         $this->getData();
         WriteLog::writeDebugLog("Start writing the DBF file at location " . $this->filename);
         if ($this->memodata) {
             $this->write($this->filename, $this->schema, $this->result, $this->memodata, $this->memodata);
         } else {
             $this->write($this->filename, $this->schema, $this->result);
         }
         WriteLog::writeDebugLog("Completed writing the DBF file at location " . $this->filename);
     } catch (Exception $exp) {
         WriteLog::writeErrorLog("Error when writing the DBF file " . $exp->getTraceAsString());
     }
 }
Exemplo n.º 2
0
 function getConnection()
 {
     WriteLog::writeDebugLog("Open Connection");
     $this->connection = new mysqli($GLOBALS["configuration"]["server"], $GLOBALS["configuration"]["username"], $GLOBALS["configuration"]["password"], $GLOBALS["configuration"]["databasename"]);
     if (!$this->connection) {
         WriteLog::writeErrorLog("Could not open DB connection. " . mysql_error());
         die('Could not connect: ' . mysql_error());
     }
 }