codeigniter

Code Igniter POST Variable

杀马特。学长 韩版系。学妹 提交于 2021-01-07 22:01:32
问题 I am brand new to Code Igniter but I can't seem to find a way to do this in the documentation, In normal PHP you can retrieve the contents of the entire POST variable like this $_POST = $postedVars But I can't seem to find something that does this in the same manner, I've tried $arr = $this->input->post; and $arr = $this->input->post(); With no luck! Is this possible in CI? Thanks in advance! 回答1: First, you need a form or something that sets the variables Then, you retrieve them. $this-

Code Igniter POST Variable

試著忘記壹切 提交于 2021-01-07 21:59:59
问题 I am brand new to Code Igniter but I can't seem to find a way to do this in the documentation, In normal PHP you can retrieve the contents of the entire POST variable like this $_POST = $postedVars But I can't seem to find something that does this in the same manner, I've tried $arr = $this->input->post; and $arr = $this->input->post(); With no luck! Is this possible in CI? Thanks in advance! 回答1: First, you need a form or something that sets the variables Then, you retrieve them. $this-

Code Igniter POST Variable

夙愿已清 提交于 2021-01-07 21:58:46
问题 I am brand new to Code Igniter but I can't seem to find a way to do this in the documentation, In normal PHP you can retrieve the contents of the entire POST variable like this $_POST = $postedVars But I can't seem to find something that does this in the same manner, I've tried $arr = $this->input->post; and $arr = $this->input->post(); With no luck! Is this possible in CI? Thanks in advance! 回答1: First, you need a form or something that sets the variables Then, you retrieve them. $this-

Failed Upload Files Codeigniter

夙愿已清 提交于 2021-01-07 03:52:30
问题 I'm try to make crud with upload file but somehow it's keep return FALSE but i don't know what's wwrong with my code if i var_dump($data) before condition upload it's show the name of my image but if i var_dump($uploads) it's keep show false This is my controller public function saveReimburse() { validate_submitted_data(array( 'nama' => 'required', 'category_reimburse_id' => 'required', 'amount' => 'required|numeric', 'date_reimburse' => 'required', )); // data $data = [ 'nama' => $this-

Failed Upload Files Codeigniter

ε祈祈猫儿з 提交于 2021-01-07 03:52:09
问题 I'm try to make crud with upload file but somehow it's keep return FALSE but i don't know what's wwrong with my code if i var_dump($data) before condition upload it's show the name of my image but if i var_dump($uploads) it's keep show false This is my controller public function saveReimburse() { validate_submitted_data(array( 'nama' => 'required', 'category_reimburse_id' => 'required', 'amount' => 'required|numeric', 'date_reimburse' => 'required', )); // data $data = [ 'nama' => $this-

Failed Upload Files Codeigniter

▼魔方 西西 提交于 2021-01-07 03:51:32
问题 I'm try to make crud with upload file but somehow it's keep return FALSE but i don't know what's wwrong with my code if i var_dump($data) before condition upload it's show the name of my image but if i var_dump($uploads) it's keep show false This is my controller public function saveReimburse() { validate_submitted_data(array( 'nama' => 'required', 'category_reimburse_id' => 'required', 'amount' => 'required|numeric', 'date_reimburse' => 'required', )); // data $data = [ 'nama' => $this-

Codeigniter Insert Batch array

久未见 提交于 2021-01-01 13:53:04
问题 I am Inserting a multiple form input data in to database using Codeigniter. I have this post input array: Array ( [subject_id] => Array ( [0] => 1 [1] => 1 ) [question] => Array ( [0] => test [1] => test2 ) [option1] => Array ( [0] => test [1] => test2 ) ) I don't get that how do i convert this array to insert How to insert this array using Insert batch. $this->db->insert_batch('mytable', $data); This is the form code which i use for posting the data: <form method="post"> <input type="text"

Path to assets folder on CodeIgniter

偶尔善良 提交于 2021-01-01 09:09:41
问题 I'm coding something into CodeIgniter and I want to apply a css template. I found one I like and download it. After merging the css code with the code I have before the merging, I found that the images used by the css template doesn't load. Originally they should stay on root of html folder (or www, or public_html, you know what I mean...), but I put them under an assets folder which is on same level as system folder. Something like this... Website Folder | |---application\ |-----(CodeIgniter

Image upload not working in codeigniter

此生再无相见时 提交于 2021-01-01 06:58:08
问题 i am trying to upload multiple images using codeigniter. But images are not uploaded to the upload_images folder. no errors are shown. View form <form action="<?php echo base_url(); ?>property/add_images2" method="post" enctype="multipart/form-data"> <input type="file" name="files1" multiple="multiple" accept="image/*"> <div id="image"> </div> <a id="another_image" href="#">Add Another Image</a> <input type="submit" value="Upload"> </form> jquery <script type="text/javascript"> $(document)

Image upload not working in codeigniter

旧巷老猫 提交于 2021-01-01 06:58:04
问题 i am trying to upload multiple images using codeigniter. But images are not uploaded to the upload_images folder. no errors are shown. View form <form action="<?php echo base_url(); ?>property/add_images2" method="post" enctype="multipart/form-data"> <input type="file" name="files1" multiple="multiple" accept="image/*"> <div id="image"> </div> <a id="another_image" href="#">Add Another Image</a> <input type="submit" value="Upload"> </form> jquery <script type="text/javascript"> $(document)