codeigniter

Codeigniter will not load language

点点圈 提交于 2020-01-03 00:41:42
问题 Hello i have problem with Codeigniter language class. I follow this guide : https://www.codeigniter.com/user_guide/libraries/language.html I create test controller I create test_lang.php inside app/language/english I set english language in config file My controller : <?php class Test extends MX_Controller { public $data; function __construct() { $this->load->helper('language'); $this->load->lang('test'); } function index() { $this->data['title'] = $this->lang->line("test"); $this->load->view

Codeigniter will not load language

不想你离开。 提交于 2020-01-03 00:41:10
问题 Hello i have problem with Codeigniter language class. I follow this guide : https://www.codeigniter.com/user_guide/libraries/language.html I create test controller I create test_lang.php inside app/language/english I set english language in config file My controller : <?php class Test extends MX_Controller { public $data; function __construct() { $this->load->helper('language'); $this->load->lang('test'); } function index() { $this->data['title'] = $this->lang->line("test"); $this->load->view

Insert array values with foreach using codeigniter

☆樱花仙子☆ 提交于 2020-01-02 22:31:22
问题 I have a form like below, and it is dynamically adding and removing fields. What I want to achieve is to insert all data from my form while it should not matter how many rows it has already present. <tr> <td><input name="model[]" type="text" class="input-large" id="A1" value="" /></td> <td><input name="color[]" type="text" class="input-small" id="Color1" value="" /></td> <td><input name="price[]" type="text" class="input-small" id="B1" value="" data-format="0,0[.]00" /></td> <td><input name=

How to send json data to codeigniter view

扶醉桌前 提交于 2020-01-02 21:54:44
问题 Hi i have a question based on how i am going to replace my web page section with the returned data from my controller. I have a page that displays the details of the movies directly from my database and i want when a user selects a specific genre then only the movies of that certain category wil be displayed. I have managed to get the name of each genre from the select box and send it to the controller were i will use it to extract the data from the database. In my html i am using a foreach

How to send json data to codeigniter view

早过忘川 提交于 2020-01-02 21:54:30
问题 Hi i have a question based on how i am going to replace my web page section with the returned data from my controller. I have a page that displays the details of the movies directly from my database and i want when a user selects a specific genre then only the movies of that certain category wil be displayed. I have managed to get the name of each genre from the select box and send it to the controller were i will use it to extract the data from the database. In my html i am using a foreach

Sending multiple email from codeigniter

好久不见. 提交于 2020-01-02 21:10:14
问题 Hi friends i am creating newsletter in codeigniter. Is there a way to send multiple email with CI email lib or should i use third party ? 回答1: Using the Email Class, something like: foreach ($list as $name => $address) { $this->email->clear(); $this->email->to($address); $this->email->from('your@example.com'); $this->email->subject('Here is your info '.$name); $this->email->message('Hi '.$name.' Here is the info you requested.'); $this->email->send(); } would work. (Straight from the docs).

CodeIgniter - URI Disallowed Characters

若如初见. 提交于 2020-01-02 20:59:35
问题 I had issue of @ which I added in $config['permitted_uri_chars'] as you can see below: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_@\-'; BUt here is my URL http://mydomain.com/awarenessroom/facebook_image_share/aHR0cDovL2Rldi5lanVpY3lzb2x1dGlvbnMuY29tL3Jla2xhaW1wYWtpc3Rhbi5jb20vdXBsb2Fkcy9hd2FyZW5lc3Nfcm9vbS9pbWFnZXMvOTEwNzA4ODI3VG9yIERheSBaYW5qZWVyLmpwZw== and it says "The URI you submitted has disallowed characters.", even if I add = in config, still not working. Can anybody let me know

How to work with Mailgun API in CodeIgniter; Forbidden error in curl_exe()

試著忘記壹切 提交于 2020-01-02 20:17:32
问题 I am working on CodeIgniter, I am using Mailgun API to send the emails.But I am getting FORBIDDEN while echoing curl_exe() as shown in code: <?php Class Email3 extends CI_Controller { function __construct() { parent::__construct(); } function index() { $ua = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.A.B.C Safari/525.13'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, 'my-api-key');

Redirect to original page after logging in (Codeigniter)

给你一囗甜甜゛ 提交于 2020-01-02 18:38:10
问题 The entire website requires a user to login before viewing the page. If the user is not logged in, he gets redirected to the login/registration page. Problem: When a user that is not logged in types in a url like http://www.domain.com/listings/1234 , he will be shown that page, but with a darkened page that prevents the user from interacting with the page (jQuery stuff, not a problem here), and a popup modal box with a link to the (Tank Auth) login page http://www.domain.com/login . After

Server side sorted data not showing in same order in Datatables

那年仲夏 提交于 2020-01-02 14:03:41
问题 I am using Datatables to show data from a database. I am using CodeIgniter for serverside scripting. Here is the table image In my serverside coding, I query to my database order by Country and in descending order. I have checked CodeIgniter select query for debugging purpose i.e $this->db->get_compiled_select() and it is showing 'SELECT * FROM `tmp` ORDER BY `country` DESC' here tmp is my database name, and it's performing well. here is my json response from the database- (I can't show you