codeigniter-3

Codeigniter - get all users session data

假装没事ソ 提交于 2020-01-12 18:57:10
问题 I need to get all sessions data and take some actions upon them, is there any possible way to get them, I found how to solve it in php but codeigniter use's it own custom sessions library. Native php $_SESSION How can I do it in codeigniter 回答1: To get all session data you can use $this->session->all_userdata(); To print all your session variable use this line anywhere in your code : echo '<pre>'; print_r($this->session->all_userdata());exit; 回答2: You can use db session. So data will be

Why are pagination links not working for me in CodeIgniter?

人走茶凉 提交于 2020-01-11 14:10:13
问题 I'm trying to use codeigniter pagination for my products so there are multiple pages which products but its not working for me and I don't know why.. This is my pagination function in my controller: //code om in allecadeaus te bepalen hoeveel producten er per pagina zitten public function pagination() { //load pagination library $this->load->library('pagination'); //laad Products_model voor pagination $this->load->model('Pagination_model'); $this->load->model('Product_model'); $config = array

How to pass data into view file

ε祈祈猫儿з 提交于 2020-01-11 13:24:10
问题 My core class class MY_Loader extends CI_Loader { public function template($template_name, $vars = array(), $return = FALSE) { if($return): $content = $this->view('admin/common/header', $vars, $return); $content = $this->view('admin/common/leftmenu', $vars, $return); $content = $this->view('admin/common/topbar', $vars, $return); $content .= $this->view($template_name, $vars, $return); $content .= $this->view('admin/common/footer', $vars, $return); return $content; else: $this->view('admin

Layout.php is not showing the header.php part

孤街醉人 提交于 2020-01-07 09:04:06
问题 I have Html like below. <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Meta, title, CSS, favicons, etc. --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> </head> <body style="background:#F7F7F7;"> <div class=""> </div> </body> </html> I divided this html in two PHP files. So.There is Header.php . Like Below. <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Meta,

Codeigniter 3 - pagination from array - links not showing up

二次信任 提交于 2020-01-07 03:27:12
问题 I'm building in CI3 and pulling data from a MSSQL database (no offset, are you kidding?), so i've been force to paginate from an array (see How to get CI pagination to work with a array();). Everything is working, I can manually add digits to the url (segment) and get the required results but i can't get the pagination links to show up at all. I have been through the other similar questions on this site but none seem to relate. Any Help would be greatly appreciated. The Route - $route['orders

CodeIgniter 3 - configuring log_threshold

不羁岁月 提交于 2020-01-07 03:05:02
问题 Ok I got confused. Inside application/config.php it says in comments: | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | |

CodeIgniter 3 - configuring log_threshold

泄露秘密 提交于 2020-01-07 03:04:26
问题 Ok I got confused. Inside application/config.php it says in comments: | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | |

Dropdown required not working in codeigniter

喜欢而已 提交于 2020-01-07 03:01:11
问题 I want to make the mail is field required, but somehow its not working, am i missing something? <div class="col-md-5 "> <div class="control-group form-group"> <label class="control-label"> Escalation Email Ids </label> <div class="controls"> <?php $options=a rray(); if(count($useridsoptions)){ foreach($useridsoptions as $key=>$val){ $options[$key]=$val; } } echo form_dropdown('esc_users[]', $options, explode(",",$row->esc_users),'id="esc_users" class="form-control function col-md-12 select2",

CodeIgniter Testing the Base URL

拥有回忆 提交于 2020-01-06 23:53:46
问题 I have downloaded and unzipped CodeIgniter 3.0.4 I have copied the files to C:\xampp\htdocs\myfirstciproj "myfirstciproj" is the folder where I have the index.php I have edited the config file as follows - $config['base_url'] = 'http://localhost/myfirstciproj/'; Now, my question is, how do I test whether CodeIgniter is correctly taking the base URL? 来源: https://stackoverflow.com/questions/35480528/codeigniter-testing-the-base-url

CodeIgniter Testing the Base URL

家住魔仙堡 提交于 2020-01-06 23:51:20
问题 I have downloaded and unzipped CodeIgniter 3.0.4 I have copied the files to C:\xampp\htdocs\myfirstciproj "myfirstciproj" is the folder where I have the index.php I have edited the config file as follows - $config['base_url'] = 'http://localhost/myfirstciproj/'; Now, my question is, how do I test whether CodeIgniter is correctly taking the base URL? 来源: https://stackoverflow.com/questions/35480528/codeigniter-testing-the-base-url