컨트롤러에서
$file_name = $this->input->get_post('file_name');
이렇게 햇는데 아무것도 저장이 안되네요ㅠㅠ
$file_name = $_REQUEST['file_name'];
이렇게 했을때는 file_name이 저장이 됩니다..ㅠ
php 5.3.3에 ci 2.1.0으로 업글했습니다
업글하면서 CI_Controller, parent:: __construct(); 수정했구요(모델도 수정했습니다.)
ㅠㅠ 왜 get_post를 못하는건지 알고 싶습니다.. 제가 틀리게 한건지..ㅠ
질문드린 부분은 get으로 보낸건데요..ㅠ
이미지 파일명을 보낸겁니다..
예를 들면 da6c5c9db7dc18c671a47de62fd1247c.png 이런식이구요..ㅠ
근데 이것뿐만 아니라 모든 get과 post가 안되는것 같더라구요 ㅠㅠ
$config['uri_protocol'] = 'REQUEST_URI'; $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?'; $config['enable_query_strings'] = TRUE;
config 설정 바꿧는데요 여전히 안되네요....ㅠ
말씀해주신대로 테스트 해보았는데 post는 잘 받아오는것 같습니다;;;;;
get만 못받아오네요ㅠㅠ
전송하는 부분
<img src=\"/?c=common&m=download&file_name=".$raw_name.$file_ext."&orig_name=".$orig_name."&mcd=".$mcd."\" alt=\"".$orig_name."\" border=\"0\" id=\"here\" width=\"".$width."\" height=\"".$height."\"/>
받는 부분
$file_name = $this->input->get_post('file_name'); //실제저장명
$orig_name = $this->input->get_post('orig_name'); //원본파일명
$mcd = $this->input->get_post('mcd');
이렇게 되어있습니다...
function get($index = NULL, $xss_clean = FALSE)
{
// Check if a field has been provided
if ($index === NULL AND ! empty($_GET))
{
$get = array();
// loop through the full _GET array
foreach (array_keys($_GET) as $key)
{
$get[$key] = $this->_fetch_from_array($_GET, $key, $xss_clean);
print_r($get[$key]);
}
return $get;
}
return $this->_fetch_from_array($_GET, $index, $xss_clean);
}
get펑션이구요
if ($index === NULL AND ! empty($_GET))
이 if문을 타야하는데 못타고 있는것 같습니다..ㅠ
$config['base_url'] = "http://localhost/";
$config['index_page'] = "";
$config['uri_protocol'] = "PATH_INFO";
$config['url_suffix'] = "";
$config['language'] = "english";
$config['charset'] = "UTF-8";
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'IW_';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
$config['log_threshold'] = 3;
$config['log_path'] = '..........';
$config['log_date_format'] = 'Y-m-d H:i:s';
$config['cache_path'] = '';
$config['encryption_key'] = "kim";
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['global_xss_filtering'] = array('TRUE', 'POST', 'GET');
$config['compress_output'] = FALSE;
$config['time_reference'] = 'local';
$config['rewrite_short_tags'] = FALSE;
$config['proxy_ips'] = '';
$config['upload_path'] = '........'; //업로드 경로
$config['upload_max_size'] = 10 * 1024; //업로드 최대 사이즈config 내용입니다. 주석지우고 경로들 지우고 올립니다..$config['uri_protocol'] = "PATH_INFO";
이값을 바꿔 보세요.
ㅠㅠ 해결 되었습니다...
/*
if ($this->_allow_get_array == FALSE)
{
$_GET = array();
}
else
{
*/
if (is_array($_GET) AND count($_GET) > 0)
{
foreach ($_GET as $key => $val)
{
$_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
}
}
/*
}
*/$config['allow_get_array'] = TRUE; 감사합니다 ㅠㅠ 웅파님이 말씀해주신데로 해도 되네여 ㅠㅠ