브라우저 chache와 관련된 직면 한 문제.Codeigniter를 사용하여 브라우저 캐시를 피하는 방법
function doUpload(){
$data['includeView'] = "profileconfirm";
$config['upload_path'] = './img/images/uploaded/';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '5000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$config['file_ext'] =".jpeg";
$config['file_name'] = $profileId.$config['file_ext'];
$config['overwrite'] = TRUE;
$this->load->library('upload', $config);
$query = null ;
if (! $this->upload->do_upload()){
// Error here
}else{
// Image uploaded sucess fully
// $profile - business logic to populate $profile
$data['PROFILE_DETAILS'] = $profile;
$this->load->view('index', $data);
}
이 방법은 이미지 업로드에 사용됩니다. 이미지 업로드가 성공적으로 완료되면 내부적으로 profileconfirm보기 페이지가 포함 된 인덱스보기 페이지가로드됩니다.
프로필 확인 페이지에서 업로드 된 새 이미지가 반영되지 않습니다. 때로는 잘 작동하지만 때로는 그렇지 않은 경우가 대부분입니다.
if (!$this->upload->do_upload())
{
$error = array('errors' => $this->upload->display_errors("<li>","</li>"));
$this->load->view('index', $error);
}else{
$data['PROFILE_DETAILS'] = $profile;
$this->load->view('index', $data);
}
을 다음과 같이보기에 오류를 표시 :
'$ last_update '는 무엇입니까? –
왜 $ last_update를 사용하고 있습니까? – sheetal