As you all know, CodeIgniter is a popular PHP framework for web development. Many developers working for improving the functionalities of CodeIgniter. CodeIgniter version is updating in a certain interval. Users can easily update the version. Before each update, check the current version of CI is compatible with the new version. Otherwise, the conflict will…
Category: CodeIgniter
Latest updates of PHP Framework CodeIgniter
HTML to PDF Conversion in CodeIgniter
A number of PHP libraries to convert HTML page to PDF file. After a lot of research and googling find TCPDF PHP library to convert HTML page to PDF file for client requirement. TCPDf PHP library quite easy to integrate with CodeIgniter. The implementation of the code. Download the TCPDF library code Download it from…
Send SMS using CodeIgniter
$url = ‘http://smsgateways.com/api/sendmsg.php?’ . http_build_query([ ‘user’ => ”, ‘pass’ => ”, ‘sender’ => ”, ‘phone’ => ”, ‘text’ => ”, ‘priority’ => ‘ndnd’, ‘stype’ => ‘normal’ ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch);
Export Database using codeigniter
Database Utility Class : CodeIgniter PHP script to download mysql db-codeigniter,Backup MySQL database with CodeIgniter public function dbexport() { $this->load->dbutil(); $prefs = array( ‘format’ => ‘zip’, ‘filename’ => ‘my_db_backup.sql’ ); $backup =& $this->dbutil->backup($prefs); $db_name = ‘backup-on-‘. date(“Y-m-d-H-i-s”) .’.zip’; $save = ‘public/uploads/’.$db_name; $this->load->helper(‘file’); write_file($save, $backup); $this->load->helper(‘download’); force_download($db_name, $backup); }
How to print Codeigniter upload error
if you want to display errors on upload functionality in codeigniter. Use the following function if($this->upload->do_upload(‘image’)) { $contentimagedata=$this->upload->data(); $descdata[‘image’]=$contentimagedata[‘file_name’]; }else { $error = array(‘error’ => $this->upload->display_errors()); print_r($error); }