codeigniter

gmail smtp not working in my hosting using codeigniter framework

孤人 提交于 2019-12-29 06:16:14
问题 i wish to use gmail smtp to send user information to the registered email. The code that i am using is working fine in my localhost, but when i changed into shared hosting it come out with the below error. A PHP Error was encountered Severity: Warning Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out) Filename: libraries/Email.php Line Number: 1652 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied

How to get Dropzone.js to upload files only when a submit button is clicked?

浪子不回头ぞ 提交于 2019-12-29 05:04:07
问题 for the past few days I've been trying to implement Dropzone into my form, but so far I had no luck figuring out how to make it upload and process the images only when the submit button gets clicked. Therefore, I decided to come here and ask you guys for help. I've made a example code structure so you can only take a look at what its necessary. Right now, I think its should work the way when I put some pictures into the Dropzone and click the button it triggers the collect_input function from

Where to place global functions in codeigniter

徘徊边缘 提交于 2019-12-29 03:40:08
问题 I have created a few utility functions like one h() that acts as echo htmlentities($var) . I want theses functions to be available everywhere . so where do i put it. 回答1: As @david barker said, you might use an helper. Create a file named, for example, "site_helper", that contains all the functions. be aware you need to check if the function already exists, though, or you'll get an "function already declared" error. So, something like: file site_helper.php (in application/helpers/ ) if(

how is create a unique tracking code [closed]

主宰稳场 提交于 2019-12-29 02:12:11
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . how can create a unique tracking code? What is your suggestion? The number of characters not more than 10 and use only of number . Please call example powerful... 回答1: If you're willing to allow for a few more

upload image file using ajax and codeigniter always throws upload_path error

a 夏天 提交于 2019-12-29 02:01:09
问题 I tried to upload a file using Codeigniter and AJAX, but my form always shows an error: the upload path isn't correct. Model public function save($data) { $this->db->insert($this->table, $data); return $this->db->insert_id(); } Controller public function ajax_add(){ $this->_validate(); $data = array( 'nama'=>$this->input->post('post_nama'), 'jenis_kelamin'=>$this->input->post('post_jk'), 'alamat'=>$this->input->post('post_alamat'), 'email'=>$this->input->post('post_email'), 'telepon'=>$this-

CodeIgniter Enabling Query Strings

岁酱吖の 提交于 2019-12-29 01:57:26
问题 I got this URL: http://twitternieuws.com/class/function/ID?oauth_token=xxxxx&oauth_verifier=xxxxx And I keep getting errors like "The page you requested was not found" or "The URI you submitted has disallowed characters". I tried changing the following options with different settings: $config['permitted_uri_chars']; $config['enable_query_strings']; $config['uri_protocol']; Is there anything I can do to make it work? I am using codeigniter 1.7.2 回答1: Query strings in 1.7.2 are a joke, it uses

I want to convert this query in codeigniter to Ignited datatable query

不想你离开。 提交于 2019-12-29 01:53:10
问题 I dont know how to convert this long model function to ignited datatable query. I have done small select functions with ignited datatables.Anybody know??? I have no idea about how to covert it. Is there any functions to do it? public function fetch_data() { $this->db->from('jil_requirements'); $this->db->join('jil_users', 'jil_requirements.rqm_userid=jil_users.usr_id', 'left'); $this->db->join('jil_merchants', 'jil_requirements.rqm_createdempid=jil_merchants.mer_id', 'left'); $this->db->where

How to display the secondary records in the data table child row with respective id?

旧巷老猫 提交于 2019-12-29 01:47:26
问题 I am using CodeIgniter and data table with child row. What I am doing is I have a master table with a primary member and a secondary member. Primary member can identify using member_type=1 and secondary member member_type=2 . Both members are connected with the relation table. I am able to display the records in the data table with the primary member as well as a secondary member. Now I am using the data table child row plugin(https://datatables.net/examples/api/row_details.html). I have to

CodeIgniter 500 Internal Server Error

你说的曾经没有我的故事 提交于 2019-12-29 01:36:07
问题 I downloaded a PHP script written using CodeIgniter. when I run it from the localhost, on going to the admin folder, it shows localhost again. Also when running from my web host, it shows a 500 Internal Server Error. I run the site from http://localhost/myproj It works. Then when I try to go to the admin page which is at http://localhost/myproj/administrator, it gives a 500 Internal Server Error. I read here that this might be due to a wrong code in the .htaccess file. This is my present

How to validation of input text field in ajax?

时光怂恿深爱的人放手 提交于 2019-12-29 01:31:08
问题 My javascript code is like this : $.ajax({ url:base_url+"agent_control/manage_booking/get_pax", type: "post", data: {id: id}, success:function(data) { App.unblockUI(); var code = JSON.parse(data); var isitable; var j; for(var i = 0; i < code.length; i++) { j = i + 1; isitable += '<tr>'; isitable += '<td>'+code[i].transactionpax_title+' '+code[i].transactionpax_firstname+' '+code[i].transactionpax_lastname+'</td>'; isitable += '<td><input type="text" id="tiket_number_'+i+'" class="form-control