codeigniter

My (header,footer) and js,css,image,favicon load only in index method not in other in codeigniter

十年热恋 提交于 2021-02-11 15:51:58
问题 I am new to code igniter and integrating bootstrap template with code igniter. i have created several pages in template already and try to integrate it with CI. my css and js structure like below: application assets css/style.css js/min.js img/imagename.jpg My controller file as below <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { public function index() { $this->load->helper('url'); $this->load->view('templates/header'); $this-

Suggestions on the search filter

蹲街弑〆低调 提交于 2021-02-11 15:51:02
问题 I am working on a website in the codeigniter framework. I am stuck at a point where I need to implement the auto complete feature. I have tried a lot but I am not able to find proper solution so far. Here is what my actual requirements are. There is a page on website that has few search filters. When a person lands on this page all the users of the website are shown on that page. Here the real game starts. There is a filter or an input box that filters out the results on the basis of their

Nesting hierarchical data into an array - PHP (Codeigniter)

丶灬走出姿态 提交于 2021-02-11 15:39:29
问题 I have been trying to solve this for while but its been a little difficult. the thing is, am trying nest the data from the table bellow into an array in the order by which they are related. +-----+------+------------+ | uid | name | supermember| +-----+------+------------+ | 1 | A | 0 | | 2 | B | 1 | | 3 | C | 1 | | 4 | D | 2 | | 5 | E | 3 | | 7 | G | 3 | | 9 | H | 4 | | 10 | I | 4 | | 11 | J | 7 | +-----+------+------------+ Here is what i have done: public function getDataAsBinaryTree($id)

Nesting hierarchical data into an array - PHP (Codeigniter)

蓝咒 提交于 2021-02-11 15:38:38
问题 I have been trying to solve this for while but its been a little difficult. the thing is, am trying nest the data from the table bellow into an array in the order by which they are related. +-----+------+------------+ | uid | name | supermember| +-----+------+------------+ | 1 | A | 0 | | 2 | B | 1 | | 3 | C | 1 | | 4 | D | 2 | | 5 | E | 3 | | 7 | G | 3 | | 9 | H | 4 | | 10 | I | 4 | | 11 | J | 7 | +-----+------+------------+ Here is what i have done: public function getDataAsBinaryTree($id)

change codeigniter .htaccess to web.config error

女生的网名这么多〃 提交于 2021-02-11 15:11:36
问题 I trying to use codeigniter on IIS, I was able to config php to work on IIS but when I tried to change the .htaccess to web.config it gives me error my htaccess code is RewriteEngine on Options +FollowSymLinks RewriteRule ^admin(.*) index.php/admin$1 RewriteRule ^supervisor/([0-9]+)(.*) index.php/supervisor_$1/$2 RewriteRule ^moder/(.*)/([0-9]+)(.*) index.php/moder/$1/$2 rewriteRule ^(login|logoff)(.*) index.php/base/$1$2 RewriteRule ^(attachment|meeting|thread|attachments|profile|search

change codeigniter .htaccess to web.config error

假装没事ソ 提交于 2021-02-11 15:08:32
问题 I trying to use codeigniter on IIS, I was able to config php to work on IIS but when I tried to change the .htaccess to web.config it gives me error my htaccess code is RewriteEngine on Options +FollowSymLinks RewriteRule ^admin(.*) index.php/admin$1 RewriteRule ^supervisor/([0-9]+)(.*) index.php/supervisor_$1/$2 RewriteRule ^moder/(.*)/([0-9]+)(.*) index.php/moder/$1/$2 rewriteRule ^(login|logoff)(.*) index.php/base/$1$2 RewriteRule ^(attachment|meeting|thread|attachments|profile|search

what is the best security practice to escape my data before submitting it into my database in CodeIgniter

梦想与她 提交于 2021-02-11 15:01:33
问题 i have written a function for insertion into my database. i have a small doubt . Is my below code provides good security to escape my data before submitting it into my database? Please suggest me some solution for this if the below code does not provide good way of insetion of data into db views.php <? echo form_open('Setups/subject'); ?> <? echo '<div id="level">'. $subjectname.' : '.form_input($fsubjectname); ?> <? echo form_submit($submitbtn); echo form_reset($resetbtn); echo '</fieldset>'

Show data in database after select an input select

空扰寡人 提交于 2021-02-11 14:41:19
问题 This is my table tour : +---------+---------+------------------+------------+---------+ | id_tour | region | destination | date_tour | price | +---------+---------+------------------+------------+---------+ | 2 | Asia | Amerika - 10 day | 05/09/2019 | 5000000 | | 4 | Asia | Rusia - 10 day | 23/06/2019 | 7000000 | | 5 | Amerika | Jepang -10 day | 25/02/2019 | 5000000 | | 6 | Amerika | Swedia-10 day | 29/07/2019 | 7000000 | +---------+---------+------------------+------------+---------+ This is

Codeigniter Multiple image upload and store to database

痴心易碎 提交于 2021-02-11 14:24:14
问题 i'm want to build image gallery using codeigniter. But my doesn't work for multiple image upload. For now, my code just working for single image upload and store it into database. Here's my controller function post() { $config = array( array( 'field' => 'teknologi_title', 'label' => '*', 'rules' => 'required|min_length[5]' ), array( 'field' => 'sub_title', 'label' => '*', 'rules' => 'required|min_length[5]' ), array( 'field' => 'editor', 'label' => '*', 'rules' => 'required|min_length[5]' ) )

PHPExcel print array result as HTML table in view

柔情痞子 提交于 2021-02-11 14:00:33
问题 I'm using PHPExcel and CodeIgniter to make an application. I have my Model for Excel treatment: class modelExcel extends CI_Model { protected $excel; function __construct() { parent::__construct(); $this->load->library('Excel'); } function readReport() { //Função para retorno dos dados do arquivo Excel $this->excel = PHPExcel_IOFactory::load(APPPATH."/exceldata/wf.xlsx"); //Seleciona a planilha ativa $objWorksheet = $this->excel->getActiveSheet()->rangeToArray('D7:J7'); return $objWorksheet;