![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 Pomógł: 0 Dołączył: 31.03.2013 Ostrzeżenie: (0%) ![]() ![]() |
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; } } ?> |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 164 Pomógł: 9 Dołączył: 30.12.2011 Ostrzeżenie: (0%) ![]() ![]() |
Tak, po prostu musisz wczytac klase ZipArchive przed wystapieniem tego bledu.
-------------------- Pomoglem? Daj pomogl!
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 11:59 |