codeigniter

how should I integrate recaptcha in Codeigniter [closed]

╄→гoц情女王★ 提交于 2020-01-14 06:34:20
问题 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 6 years ago . I want to integrate recaptcha in registration form in Codeigniter. The form will post in ajax. Please help me.. thanks in advance 回答1: Here you will find your solution. https://developers.google.com/recaptcha

PHP Looping array from excel

落花浮王杯 提交于 2020-01-14 06:28:10
问题 I'm trying to get the data that I uploaded from excel using foreach and for loop, but the weird thing is when I upload excel file w/ 12 rows it successfully insert, but when I upload excel w/ 13 rows and up its only get the last row and I'm getting the error Uninitialized Offset :8 . this is the array when I uploaded excel w/ 12 rows. array(12) { [0]=> array(1) { [0]=> array(9) { [0]=> string(8) "CC-00057" [1]=> float(123) [2]=> string(5) "apple" [3]=> float(45) [4]=> string(2) "pc" [5]=>

Outputting two dimensional array - CodeIgniter

。_饼干妹妹 提交于 2020-01-14 05:17:07
问题 I'm trying to match subcategories with their respective parent categories. For now I just hard-coded in the main categories on the view (Books, Clothes etc) and have a function to get all subcategories, then in the view I can make a while loop to match every subcategory with its main one. I've managed to get the data I want into an array, which now looks like this: array 1 => array 1 => string 'Medicine' 2 => string 'Fairy tales' 3 => string 'Novels' 2 => array 44 => string 'Men's Clothing'

Fatal error: Maximum execution time of 30 seconds exceeded in codeigniter

微笑、不失礼 提交于 2020-01-14 05:14:30
问题 Fatal error: Maximum execution time of 30 seconds exceeded in D:\wamp\www\moneymanager18_8_15\system\database\drivers\mysqli\mysqli_driver.php on line 221 This happens during uploading.file is getting uploaded,but the same time this error shows. 回答1: Write this above your controller. ini_set('max_execution_time', 0); ini_set('memory_limit','2048M'); 回答2: There is a something that CodeIgniter not include this in their documentation. Go to the page in system/core/CodeIgniter.php and search this

Download a file from FTP server to client machine via website with CodeIgniter

混江龙づ霸主 提交于 2020-01-14 04:27:08
问题 I need download with CodeIgniter. I tried with the force_download function and download function. With the download function it works, but doesn't permit select the folder for the download. With the force download function the browser downloads an empty file. $this->load->helper('download'); $path = file_get_contents(base_url()."modulos/".$filename); // get file name $name = "sample_file.pdf"; // new name for your file // force_download($name, $path); // start download // or $this->ftp-

Codeigniter regexp routing

南楼画角 提交于 2020-01-14 02:02:09
问题 I have a problem with routing like this: $route['(/[a-z]{2}/)'] = 'locale/somepage'; And in .htaccess RewriteEngine on RewriteBase / RewriteRule ^(/[a-z]{2}/)$ /index.php/locale/somepage I need replace first section of url (class or controller) and call an another controller. For example, I need to url as /en/page will call controller locale , but url need not be changed. This code is not working. And if I try use only routes.php or only .htaccess, it not working too. How I can make it work?

Codeigniter 3 pagination class with bootstrap 4

[亡魂溺海] 提交于 2020-01-13 11:49:07
问题 Is Codeigniter 3 compatible with Bootstrap 4? or is it simply way too outdated to add any uses for bootstrap 4? I've been looking at tutorials online on how to integrate bootstrap to Codeigniter pagination. So far all i've seen is that they mostly changed the $config of the pagination class. For example: //config for bootstrap pagination class integration $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = false; $config['last

Unable to auto/manually load database library in codeigniter

醉酒当歌 提交于 2020-01-13 11:46:12
问题 I'm unable to load database library in CodeIgniter's default extracted code 1) via autoload.php $autoload['libraries'] = array('database'); 2) Inside controller via $this->load->library("database"); or $CI =& get_instance(); $CI->load->database(); Error message: The page cannot be displayed because an internal server error has occurred. Environment: CodeIgniter 2.1.3, PHP 5.2.13 on IIS (ISAPI), MySQL (5.0.45-community-nt), Plesk. I have confirmed that code written in plain PHP allows me to

Codeigniter - Active record - sql - complex join

流过昼夜 提交于 2020-01-13 09:34:11
问题 I have a function that retrieves all tags from a table: function global_popular_tags() { $this->db->select('tags.*, COUNT(tags.id) AS count'); $this->db->from('tags'); $this->db->join('tags_to_work', 'tags.id = tags_to_work.tag_id'); $this->db->group_by('tags.id'); $this->db->order_by('count', 'desc'); $query = $this->db->get()->result_array(); return $query; } I have another table called 'work'. The 'work' table has a 'draft' column with values of either 1 or 0. I want the COUNT(tags.id) to

Forum/Board written atop one of the big PHP Frameworks

青春壹個敷衍的年華 提交于 2020-01-13 09:18:07
问题 I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more secure, because of ORM and validation and abstracted processing logic. And also would be good showcase of the framework itself. Tutorials and example