Config folder For Dev Env : ps
This commit is contained in:
parent
4580a57563
commit
f6f709eba8
@ -58,7 +58,7 @@
|
|||||||
|
|
|
|
||||||
| $autoload['libraries'] = array('user_agent' => 'ua');
|
| $autoload['libraries'] = array('user_agent' => 'ua');
|
||||||
*/
|
*/
|
||||||
$autoload['libraries'] = array('email');
|
$autoload['libraries'] = array('session','database','email');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
@ -89,8 +89,7 @@
|
|||||||
|
|
|
|
||||||
| $autoload['helper'] = array('url', 'file');
|
| $autoload['helper'] = array('url', 'file');
|
||||||
*/
|
*/
|
||||||
$autoload['helper'] = array('url', 'mail');
|
$autoload['helper'] = array('url','custom','mail', 'data');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
| Auto-load Config files
|
| Auto-load Config files
|
||||||
@ -132,4 +131,4 @@
|
|||||||
|
|
|
|
||||||
| $autoload['model'] = array('first_model' => 'first');
|
| $autoload['model'] = array('first_model' => 'first');
|
||||||
*/
|
*/
|
||||||
$autoload['model'] = array();
|
$autoload['model'] = array('auth/auth_model');
|
||||||
@ -23,7 +23,10 @@
|
|||||||
| a PHP script and you can easily do that on your own.
|
| a PHP script and you can easily do that on your own.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['base_url'] = 'https://localhost/CodeIgniter-HMVC';
|
// $config['base_url'] = 'https://localhost/CodeIgniter-HMVC';
|
||||||
|
$base = "http://".$_SERVER['HTTP_HOST'];
|
||||||
|
$base .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||||
|
$config['base_url'] = $base;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -223,7 +226,7 @@
|
|||||||
| your log files will fill up very fast.
|
| your log files will fill up very fast.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['log_threshold'] = 0;
|
$config['log_threshold'] = 4;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -449,7 +452,7 @@
|
|||||||
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||||
*/
|
*/
|
||||||
$config['csrf_protection'] = FALSE;
|
$config['csrf_protection'] = FALSE;
|
||||||
$config['csrf_token_name'] = 'csrf_test_name';
|
$config['csrf_token_name'] = 'ci_csrf_token';
|
||||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||||
$config['csrf_expire'] = 7200;
|
$config['csrf_expire'] = 7200;
|
||||||
$config['csrf_regenerate'] = TRUE;
|
$config['csrf_regenerate'] = TRUE;
|
||||||
|
|||||||
@ -75,10 +75,14 @@
|
|||||||
|
|
||||||
$db['default'] = array(
|
$db['default'] = array(
|
||||||
'dsn' => '',
|
'dsn' => '',
|
||||||
'hostname' => 'localhost',
|
// 'hostname' => 'localhost',
|
||||||
'username' => '',
|
// 'username' => 'root',
|
||||||
'password' => '',
|
// 'password' => '',
|
||||||
'database' => '',
|
// 'database' => 'venbaehn_ams',
|
||||||
|
'hostname' => '119.18.54.85',
|
||||||
|
'username' => 'venbaehn_ams',
|
||||||
|
'password' => 'L;nD7Z@f)1ZT',
|
||||||
|
'database' => 'venbaehn_ams',
|
||||||
'dbdriver' => 'mysqli',
|
'dbdriver' => 'mysqli',
|
||||||
'dbprefix' => '',
|
'dbprefix' => '',
|
||||||
'pconnect' => FALSE,
|
'pconnect' => FALSE,
|
||||||
|
|||||||
@ -11,3 +11,10 @@
|
|||||||
| https://codeigniter.com/user_guide/general/hooks.html
|
| https://codeigniter.com/user_guide/general/hooks.html
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
$hook['pre_controller'] = array(
|
||||||
|
'class' => 'MyHooks',
|
||||||
|
'function' => 'initialize',
|
||||||
|
'filename' => 'MyHooks.php',
|
||||||
|
'filepath' => 'hooks',
|
||||||
|
);
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,11 @@
|
|||||||
| Examples: my-controller/index -> my_controller/index
|
| Examples: my-controller/index -> my_controller/index
|
||||||
| my-controller/my-method -> my_controller/my_method
|
| my-controller/my-method -> my_controller/my_method
|
||||||
*/
|
*/
|
||||||
// $route['default_controller'] = 'welcome';
|
// $route['default_controller'] = 'Backend';
|
||||||
$route['default_controller'] = 'Auth';
|
$route['default_controller'] = 'Auth';
|
||||||
$route['404_override'] = '';
|
$route['404_override'] = '';
|
||||||
$route['translate_uri_dashes'] = FALSE;
|
$route['translate_uri_dashes'] = FALSE;
|
||||||
|
|
||||||
|
//modules routes
|
||||||
|
$route['logout'] = 'Auth/logout';
|
||||||
|
$route['login'] = 'Auth';
|
||||||
@ -11,3 +11,10 @@
|
|||||||
| https://codeigniter.com/user_guide/general/hooks.html
|
| https://codeigniter.com/user_guide/general/hooks.html
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
$hook['pre_controller'] = array(
|
||||||
|
'class' => 'MyHooks',
|
||||||
|
'function' => 'initialize',
|
||||||
|
'filename' => 'MyHooks.php',
|
||||||
|
'filepath' => 'hooks',
|
||||||
|
);
|
||||||
|
|
||||||
|
|||||||
@ -449,8 +449,8 @@
|
|||||||
| 'csrf_regenerate' = Regenerate token on every submission
|
| 'csrf_regenerate' = Regenerate token on every submission
|
||||||
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||||
*/
|
*/
|
||||||
$config['csrf_protection'] = FALSE;
|
$config['csrf_protection'] = TRUE;
|
||||||
$config['csrf_token_name'] = 'csrf_test_name';
|
$config['csrf_token_name'] = 'ci_csrf_token';
|
||||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||||
$config['csrf_expire'] = 7200;
|
$config['csrf_expire'] = 7200;
|
||||||
$config['csrf_regenerate'] = TRUE;
|
$config['csrf_regenerate'] = TRUE;
|
||||||
|
|||||||
18
index.php
18
index.php
@ -68,7 +68,7 @@
|
|||||||
define('ENVIRONMENT', 'testing');
|
define('ENVIRONMENT', 'testing');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
define('ENVIRONMENT', 'testing');
|
define('ENVIRONMENT', 'development');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,7 +98,17 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'testing':
|
case 'testing':
|
||||||
// ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
|
error_reporting(-1);
|
||||||
|
if (version_compare(PHP_VERSION, '5.3', '>=')) {
|
||||||
|
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
|
||||||
|
} else {
|
||||||
|
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'production':
|
||||||
|
ini_set('display_errors', 1);
|
||||||
// error_reporting(-1);
|
// error_reporting(-1);
|
||||||
// if (version_compare(PHP_VERSION, '5.3', '>=')) {
|
// if (version_compare(PHP_VERSION, '5.3', '>=')) {
|
||||||
// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
|
// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
|
||||||
@ -107,10 +117,6 @@
|
|||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'production':
|
|
||||||
ini_set('display_errors', 1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
header('HTTP/1.1 503 Service Unavailable.', true, 503);
|
header('HTTP/1.1 503 Service Unavailable.', true, 503);
|
||||||
echo 'The application environment is not set correctly.';
|
echo 'The application environment is not set correctly.';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user