removed bck files and imporved passowrd on env
This commit is contained in:
+17
-20
@@ -1,16 +1,16 @@
|
||||
|
||||
<?php
|
||||
// dump db and backup folder yogasoul... placed into claudiosironi.com ... folder of backup = tempzip in the main ideezeur folder
|
||||
|
||||
|
||||
//dump database
|
||||
/*
|
||||
// dump db and backup folder yogasoul... placed into claudiosironi.com ... folder of backup = tempzip in the main ideezeur folder
|
||||
|
||||
|
||||
//dump database
|
||||
/*
|
||||
ini_set('memory_limit', '-1');
|
||||
// Database configuration
|
||||
$host = "localhost";
|
||||
$username = "u00wiumd4xnrd";
|
||||
$password = "ukowysga7w5x";
|
||||
$database_name = "dbcov4clvrmrzn";
|
||||
$username = "xxxx";
|
||||
$password = "xxxx";
|
||||
$database_name = "xxxx";
|
||||
|
||||
// Get connection object and set the charset
|
||||
$conn = mysqli_connect($host, $username, $password, $database_name);
|
||||
@@ -77,8 +77,8 @@ foreach ($tables as $table) {
|
||||
} */
|
||||
?>
|
||||
|
||||
<?
|
||||
// archive into ZIP the folder
|
||||
<?
|
||||
// archive into ZIP the folder
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(3600);
|
||||
|
||||
@@ -86,36 +86,33 @@ set_time_limit(3600);
|
||||
$main_path = '../modulo_certificazione';
|
||||
$zip_file = '../tempbck//cimac.tar';
|
||||
|
||||
if (file_exists($main_path) && is_dir($main_path))
|
||||
{
|
||||
if (file_exists($main_path) && is_dir($main_path)) {
|
||||
$zip = new ZipArchive();
|
||||
|
||||
if (file_exists($zip_file)) {
|
||||
unlink($zip_file); // truncate ZIP
|
||||
}
|
||||
if ($zip->open($zip_file, ZIPARCHIVE::CREATE)!==TRUE) {
|
||||
if ($zip->open($zip_file, ZIPARCHIVE::CREATE) !== TRUE) {
|
||||
die("cannot open <$zip_file>\n");
|
||||
}
|
||||
|
||||
$files = 0;
|
||||
$paths = array($main_path);
|
||||
while (list(, $path) = each($paths))
|
||||
{
|
||||
foreach (glob($path.'/*') as $p)
|
||||
{
|
||||
while (list(, $path) = each($paths)) {
|
||||
foreach (glob($path . '/*') as $p) {
|
||||
if (is_dir($p)) {
|
||||
$paths[] = $p;
|
||||
} else {
|
||||
$zip->addFile($p);
|
||||
$files++;
|
||||
|
||||
echo $p."<br>\n";
|
||||
echo $p . "<br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo 'Total files: '.$files;
|
||||
echo 'Total files: ' . $files;
|
||||
|
||||
$zip->close();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user