Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [inne][PHP]problem z logowaniem do panelu admin
Forum PHP.pl > Forum > Przedszkole
black_horsik
Witam,
podczas logowania do panelu admin niespodziewanie pojawia się komunikat :"Fatal error: Class 'ZipArchive' not found in /home/gaborcompl/gabor.com/class/createDirZip.class.php on line 3". Czy można to naprawić?



<?

class createDirZip extends ZipArchive {
function get_files_from_folder($directory, $put_into) {
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if (is_file($directory.$file)) {
parent::addFile($directory.$file, $put_into.$file);
} elseif ($file != '.' and $file != '..' and is_dir($directory.$file)) {
parent::addEmptyDir($put_into.$file.'/');
$this->get_files_from_folder($directory.$file.'/', $put_into.$file.'/');
}
}
}
closedir($handle);
}
}

class dumpSQL extends connect_mysql_extends {
function __construct() {
parent::__construct();
}

function dumpData() {
$current_time = date("U");
$thesql="";
$thesql.="#SQL DATA FOR ".$this->db." \n";
$thesql.="#BACK UP DATE ". date("d/m/Y G:i.s",$current_time)." \n";
$result = mysql_list_tables($this->db);
while ($row = mysql_fetch_row($result))
{
$getdata=mysql_query("SELECT * FROM $row[0]");
while ($row1=mysql_fetch_array($getdata))
{
$thesql.="INSERT INTO `$row[0]` VALUES (";
$getcols = mysql_list_fields($this->db,$row[0],$this->connect);
for($c=0;$c<mysql_num_fields($getcols);$c++)
{
if (strstr(mysql_field_type($getdata,$c),'blob')) $row1[$c]=bin2hex($row1[$c]);
//Binary null fix if ever needed
if ($row1[$c]=="0x") $row1[$c]="0x1";

//delimit the apostrophies for mysql compatability
$row1[$c]=str_replace("'","''",$row1[$c]);
if (strstr(mysql_field_type($getdata,$c),'blob'))
$thesql.="0x$row1[$c]";
else
$thesql.="'$row1[$c]'";
if ($c<mysql_num_fields($getcols)-1) $thesql.=",";
}
$thesql.=");;\n";
}
}
return $thesql;
}
}
?>
artuross
Tak, po prostu musisz wczytac klase ZipArchive przed wystapieniem tego bledu.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.