Category: PHP

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); }

Download failed.: SSL certificate problem, verify that the CA cert is OK

Follow the simple steps to recover from the above wordpress upgrade error step 1 .Create a folder, which may be missing: /wp-content/mu-plugins step 2. Create a php file inside that folder and name upgrade_fix.php put the following code into the php file and save add_filter(‘https_ssl_verify’, ‘__return_false’); add_filter(‘https_local_ssl_verify’, ‘__return_false’); step3. Go directly and run the network upgrade again,


check ssl port in shared hosting is closed

Check ssl port in shared hosting is closed, use the php code to check if it is open. Here use gmail smtp for checking. $fp = fsockopen(“”, 80, $errno, &$errstr, 10); // work fine if (!$fp) echo “ – $errstr ($errno)n”; else echo “ – okn”; $fp = fsockopen(“”, 465, $errno, $errstr, 10); // NOT

Generate three letter month name from a date with example code

Php date function have number of usages in Web programming. You can make it our own different ways for desired output. Here the piece of php code tell how to Generate three letter month name from a date echo date(‘M’, strtotime(’14-12-1985′)); OutPut Dec 3 letter abbreviation of english Month December Searches related to php date

Enabling Maintenance Mode in OpenCart

Enabling Maintenance Mode in OpenCart

Opencart is a Lightweight E-commerce CMS with large number of modules and extensions. Easy steps for Enabling Maintenance Mode Sign in Opencart Admin Step-1: Go to System -> Settings Step-2: Select your store from the list and click on edit.           Step-3: Select the Server tab and Go to the Maintenance

Looking for PHP Expert with 3-4+ years of experience

[highlight]Looking for PHP Programmer with 3-4+  years of experience to join our team![/highlight] [highlight]Company: Bridge India ,Palarivattom[/highlight] Job Location:Cochin Requirements: Experience in any PHP frameworks. CakePHP  is Preferred Strong knowledge of PHP, OOPS, MySQL, Javascript, Jquery, HTML5, CSS. Experience in GIT. Must have excellent communication skills, logical skills and problem-solving skills. Salary: Negotiable Interested applicants

website development

Get youtube video time duration

Use the following PHP function will return the YouTube video duration.Before that following the step given below Steps for get Get youtube video time duration. 1.Create one Google API and get API key from At the time of creating api please leave the option blank “creating api Accept requests from these HTTP referrers (web

website development

CodeIgniter Disallowed Key Characters

Somewhere in the html form you simply missed the opening quote  of input name attribute(s). Example <input type=”text” name=last_name“> Just find and use the right syntax for happy coding. You can find the code for tracking disallowed characters are in system/core/input.php file function _clean_input_keys($string) { if (! preg_match(“/^[a-z0-9:_/-]+$/i”, $string)) { exit(‘Disallowed Key Characters.+’. $string)); } return

Global Ajax Event Handlers

These following Global Ajax Events to be called at the time of initialization ,completion,success,send..etc. These type of events are triggered on each Ajax request, if the global property in jQuery.ajaxSetup() is true . ajaxComplete():This global event to be triggered when Ajax requests complete. .ajaxError(): This global event to be triggered when Ajax requests complete with