���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/adimi/application/libraries/synchronizer/ |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* * ------------------------------------------ * Developed by <[email protected]> * ------------------------------------------ */ class SyncData { private $incomingDir = './assets/data/incoming/'; public function importSQL() { $ci =& get_instance(); $mysqli = mysqli_connect( $ci->db->hostname, $ci->db->username, $ci->db->password, $ci->db->database ); /* check connection */ if ($mysqli->connect_errno) { $data['error'] = "Connect failed: ". $mysqli->connect_error; echo json_encode($data); exit; } $filePath = $this->incomingDir.'backup.sql'; if (file_exists($filePath) ) { $sql = file_get_contents($filePath); /* execute multi query */ if ($mysqli->multi_query($sql)) { @unlink($filePath); $mysqli->close(); return true; } else { return false; } } else { return false; } } }