PHP Classes

File: example/index.php

Recommend this page to a friend!
  Classes of Alexsandro Souza  >  Update Environment  >  example/index.php  >  Download  
File: example/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Update Environment
Update database and files from a remote server
Author: By
Last change:
Date: 10 years ago
Size: 1,845 bytes


Class file image Download
// remote access db
define(REMOTE_DB_TIPO, 'mysql');
define(REMOTE_DB_PORT, '');
define(REMOTE_DB_NAME, 'blowtex');
define(REMOTE_DB_USER, 'root');
define(REMOTE_DB_PASS, 'salve');
define(REMOTE_DB_HOST, 'salveweb');

//local access db
define(LOCAL_DB_TIPO, 'mysql');
define(LOCAL_DB_PORT, '');
define(LOCAL_DB_NAME, 'test');
define(LOCAL_DB_USER, 'root');
define(LOCAL_DB_PASS, '');
define(LOCAL_DB_HOST, 'localhost');

define(RECORD_LIMIT, 50);
define(PATH_COMPLEMENT, '');


$aModelOfTable = array(
'customer' => array( //name table
'class'=>'Customer', //class model of table
'constPath'=>'DIR_FILE', // constant of class model with the path of the files
'thumb' =>array('t1_','t2_'), //abbreviation of the thumb of the file
'columnOrder' =>'id', //column used to sort the results of queries
'columnDownload' =>'file'//column that usually saves the files to be downloaded, it does not contain this column in the table, the component filters all columns by searching for valid, current gif, jpg, png and pdf
'product' => array(
'thumb' =>array('t1_','t2_'),
'columnOrder' =>'dateinsert'

//array with the tables that should not be updated
$aExcludeTable = array(

$urlRemote = '';
$updateDb = new UpdateDataBase($urlRemote,$aModelOfTable);

$download = new Download($aModelOfTable,$urlRemote);


For more information send a message to info at phpclasses dot org.