CodeIgniter Disallowed Key Characters

The problem is you are using characters not included in the standard Regex. Use this: !preg_match(“/^[a-z0-9\x{4e00}-\x{9fa5}\:\;\.\,\?\!\@\#\$%\^\*\”\~\’+=\\\ &_\/\.\[\]-\}\{]+$/iu”, $str) As per the comments (and personal experience) you should not modify they Input.php file — rather, you should create/use your own MY_Input.php as follows: <?php class MY_Input extends CI_Input { /** * Clean Keys * * This … Read more

Multiple files upload (Array) with CodeIgniter 2.0

I finally managed to make it work with your help! Here’s my code: function do_upload() { $this->load->library(‘upload’); $files = $_FILES; $cpt = count($_FILES[‘userfile’][‘name’]); for($i=0; $i<$cpt; $i++) { $_FILES[‘userfile’][‘name’]= $files[‘userfile’][‘name’][$i]; $_FILES[‘userfile’][‘type’]= $files[‘userfile’][‘type’][$i]; $_FILES[‘userfile’][‘tmp_name’]= $files[‘userfile’][‘tmp_name’][$i]; $_FILES[‘userfile’][‘error’]= $files[‘userfile’][‘error’][$i]; $_FILES[‘userfile’][‘size’]= $files[‘userfile’][‘size’][$i]; $this->upload->initialize($this->set_upload_options()); $this->upload->do_upload(); } } private function set_upload_options() { //upload an image options $config = array(); $config[‘upload_path’] = ‘./Images/’; … Read more

multiple where condition codeigniter

you can use an array and pass the array. Associative array method: $array = array(‘name’ => $name, ‘title’ => $title, ‘status’ => $status); $this->db->where($array); // Produces: WHERE name=”Joe” AND title=”boss” AND status=”active” Or if you want to do something other than = comparison $array = array(‘name !=’ => $name, ‘id <‘ => $id, ‘date >’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)