codeigniter

Codeigniter 3.1.6 - How to remove index.php from url

微笑、不失礼 提交于 2019-12-23 12:02:06
问题 I am working on codeigniter 3.1.6. I added the .htaccess file. I also changed the base_url path to my project path, removed the index.php from index_page and changed the url_protocol to REQUEST_URI . Still, while I am redirecting the url to any controllers method it throwing an error as ' The page you requested was not found .' I also searched and applied different .htaccess but its not working. If I am addling /index.php at end of base_url then its working but its wrong though. It should

is it okay to “repeatedly” xss-clean data in CodeIgniter?

不羁岁月 提交于 2019-12-23 11:54:30
问题 The following are ways to XSS-clean data in Codeigniter: set global_xss_filtering in config to TRUE use xss_clean() use xss_clean as a validation rule set the second parameter to TRUE in $this->input->post('something', TRUE) Is it okay to use all or more than one of them on one piece of data? For example, would it be okay if I still used $this->input->post('something', TRUE) even if the data has already been cleaned by global_xss_filtering and xss_clean validation rule? 回答1: It's not going to

Sending SMTP email from PHP Script hosted on Hostgator Servers

徘徊边缘 提交于 2019-12-23 11:32:09
问题 I have created a web application as such in the application I require to send to send users their passwords if they have forgotten them. Now I use a gmail account to send the email. When I send the email locally from my machine using XAMPP everything works fine and it delivers as expected. When I look to put the php script onto a Hostgator server and try send the user their password I can't. But the reason I think this is happening is because Gmail immediately send me the following: Someone

Very high latency in first HTTP request on CodeIgniter project

冷暖自知 提交于 2019-12-23 10:59:37
问题 A friend and I just started working in a project which other people stopped developing a couple of years ago, and we're trying to resurrect it. We've already solved most of the setup-related issues, but there's a really annoying one that we can't figure out. In our localhosts, all the pages take A LOT of time to load/refresh. And I don't mean assets, scripts or anything, the problem is the latency until the first request completes. Most times it takes 15 to 30 seconds, which is unacceptable,

Failed to connect: 0 push notification

﹥>﹥吖頭↗ 提交于 2019-12-23 10:58:49
问题 When i execute the below code it is getting Failed to connect: 0 1) My path to .pem file is correct.Below is the code which i executed. Iam completely new for this dono wats happening in the code. I am placing the code below $deviceToken = '44fb58e8011392a1569ddc73ff96d028b5d78739258678455a16abf4e55fa1c1'; //$deviceToken = '44fb58e8011392a1569ddc73ff96d028b5d78739258678455a16abf4e55fa1c1'; // Put your private key's passphrase here: $passphrase = 'zFaMRvDh7vGTPqh3k

Moving a php project to codeigniter or updating the existing framework [closed]

我只是一个虾纸丫 提交于 2019-12-23 10:56:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm trying to figure out the best way to handle a php project going forward. It was built a few years ago on a custom framework - the

How can i increase the font size of codeigniter captcha helper

巧了我就是萌 提交于 2019-12-23 10:55:34
问题 I am using the codeigniter * capctha * helper. The thing is I can not increase the font size of letters. I tried to do it by if ($use_font == FALSE) { $font_size = 6; $x = rand(0, $img_width/($length/2)); $y = 0; } else { $font_size = 20; $x = rand(0, $img_width/($length/1.5)); $y = $font_size+2; } but nothing happens, how can change the font size, please help. Thanks in advance. 回答1: You are changing the correct parameter, whether in the core file or the application/helpers file. Double

Does CodeIgniter's ci_sessions need occasional emptying?

≯℡__Kan透↙ 提交于 2019-12-23 10:54:30
问题 I am using CI's sessions in connection with a database. So all of our sessions are in this ci_sessions table on our database and it can get a lot of rows, considering that the session_id keep changing every 5 minutes. Do we need to empty the table, say every one a month / week maybe? 回答1: No, CodeIgniter cleans up after itself... Note According to the CodeIgniter documentation: The Session class has built-in garbage collection which clears out expired sessions so you do not need to write your

how to set error message for each field in codeigniter php

我的梦境 提交于 2019-12-23 10:41:04
问题 i want to set different error message for each field in the form.This is my controller.. $this->form_validation->set_rules('fname', 'First Name','required'); $this->form_validation->set_message('required', 'कृपया प्रथम नाव भरा','fname'); $this->form_validation->set_rules('address', 'Address','required'); $this->form_validation->set_message('required', 'कृपया पत्ता भरा','address'); but problem is that if validation fails it print only error message for last field. 回答1: I solved it ...first of

CodeIgniter: SQL Audit of all $this->db->query() method calls?

拈花ヽ惹草 提交于 2019-12-23 09:58:39
问题 I'm using CodeIgniter 2+ and would like to Audit all $this->db->query($sql); calls. All of our database calls are thru the query() method; no active record usage. I need to record the $sql queries and enter them into an custom table for audit recording purposes. Does any know of a way of extended the core system database library to audit queries? It seems like this should be easy, but I can't seem to find a simple solution. The CI forum has a couple of failure posts about old versions. 回答1: