반응형

정상적으로 작동하다가 Disallowed Key Characters. 에러가 발생


검색해 보니 여러 이유가 있는듯 했음...


system - core - Input.php 파일을 수정하여 해결



function _clean_input_keys($str) 를 검색하여


preg_match("/^[a-z0-9:_\/-]+$/i", $str))   부분에 | 추가


preg_match("/^[a-z0-9:_\/-]+$|/i", $str))


반응형
반응형

An Error Was Encountered

In order to use the Session class you are required to set an encryption key in your config file.


ci를 사용하여 세션을 생성하려하는데 다음과 같은 에러가 발생하였다. 


application - config - config.php 파일의 아래와 같은 부분이 공백이기때문이다.


$config['encryption_key'] = '';


위의 내용을 채워주면 오류가 발생하지 않는다.

(아무 내용이나 적어도 상관없으면 긴것이 좋다)

반응형
반응형

application - config - config.php 파일 수정


//$config['base_url'] = '';

$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");

$config['base_url'] .= "://" . $_SERVER['HTTP_HOST'];

$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']);


//$config['index_page'] = 'index.php';
$config['index_page'] = '';

.htaccess 파일 수정 (이 파일은 index.php 와 같은 경로에 존재해야 하며, 없을경우 생성해주면된다.)

-index.php 파일이 최상위 경로에 있는경우
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|js|robots\.txt)
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

-index.php 파일이 하위 폴더 경로에 있는경우 (이것을 찾지 못하여 시간이 좀 걸림)
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|js|robots\.txt)
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ 폴더경로/index.php/$1 [L]
</IfModule>


반응형

+ Recent posts