-
Download codeigniter project file from https://codeigniter.com/download
-
Extract and place it inside htdocs or www depending upon the server.
-
create
.htaccess
file on the root of the project. -
Navigate to
application\config\
. -
open
autoload.php
and change$autoload['libraries'] = array('database', 'session');
$autoload['helper'] = array('url','form');
-
open
database.php
and put database name, username, password -
open
config.php
and set the base url to whatever project folder you are currently working on like$config['base_url'] = 'http://localhost/CodeIgniter';
then, remove the index.php from$config['index_page'] = '';
. Add an encryption key for sessions in$config['encryption_key'] = '';
. Change the existing config settings to$config['sess_driver'] = 'database'; $config['sess_table_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_encrypt_cookie'] = TRUE; $config['sess_cookie_name'] = 'ci_session'; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_match_useragent'] = FALSE;
-
open
routes.php
and set default_controller$route['default_controller'] = 'def_cont';
-
Execute following SQL
CREATE TABLE IF NOT EXISTS `ci_session` ( `id` varchar(128) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) unsigned DEFAULT 0 NOT NULL, `data` blob NOT NULL, KEY `ci_sessions_timestamp` (`timestamp`) );
Last active
September 14, 2017 18:40
-
-
Save somecuitears/0362482627d6e3f1b2e8ce132390287d to your computer and use it in GitHub Desktop.
Codeigniter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /codeigniter/ | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
RewriteCond %{REQUEST_URI} ^application.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> | |
<IfModule !mod_rewrite.c> | |
ErrorDocument 404 /index.php | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment