Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/11/2003, 20:06
Avatar de nuevo
nuevo
 
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 20 años, 11 meses
Puntos: 2
Código PHP:
/********************************************************************************/
/*  FUNC PARA REALIZAR UN BACKUP DE MYSQL Y ENVIARLO AL NAVEGADOR: SERVER WIN   */
/********************************************************************************/
function FUNC_backupW32($file_backup,$resultado){//FUNC_backupW32($file_backup='backup.sql',$resultado);

    
header("Pragma: no-cache");
    
header("Expires: 0");
    
header("Content-Transfer-Encoding: binary");
    
header("Content-type: application/force-download");
    
header("Content-Disposition: attachment; filename=$filename");

    
$executa "c:\mysql\bin\mysqldump.exe -u $sql_usuario --password=$sql_pass --opt $sql_db";
        
system($executa$resultado);

    if (
$resultado) { echo "<H1>Error ejecutando comando: $executa</H1>\n"; }

}
//////////////////////////////////////////////////////////////////////////////////


/********************************************************************************/
/*  FUNC PARA REALIZAR UN BACKUP DE MYSQL Y ENVIARLO AL NAVEGADOR: SERVER UNIX  */
/********************************************************************************/
function FUNC_backupLinux($file_backup,$resultado){//FUNC_backupLinux($file_backup='backup.sql',$resultado);

    
header("Pragma: no-cache");
    
header("Expires: 0");
    
header("Content-Transfer-Encoding: binary");
    
header("Content-type: application/force-download");
    
header("Content-Disposition: attachment; filename=$filename");

    
$executa "mysqldump -u $sql_usuario --password=$sql_pass --opt $sql_db";
        
system($executa$resultado);

    if (
$resultado) { echo "<H1>Error ejecutando comando: $executa</H1>\n"; }

}
////////////////////////////////////////////////////////////////////////////////// 
__________________
3w.valenciadjs.com
3w.laislatv.com