CI 묻고 답하기

제목 ci 페이징 에러 문의 드립니다~
카테고리 CI 2, 3
글쓴이 minju84 작성시각 2018/02/04 19:00:31
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 12143   RSS

선배님들 안녕하세요~ 초보 개발자 입니다~~ 지금 페이징 처리를 하고있는데

몇시간째 이상한 에러가 나는데 어떤 에러인지 알길이 없어서 조언 구합니다~~

 

에러는 

An Error Was Encountered

Unable to load the requested file: indexArray.php 

이런에러가 나고있는데 실제 페이지중에 indexArray.php라는 페이지는 없습니다..

 

소스코드는 아래는 컨트롤 페이지 이구요~~

<?php
function index($index=0)
{
$this->load->library('pagination');
$config['base_url'] = site_url('base/index/');
$config['first_link'] = 'First';
$config['last_link'] = 'Last';
$config['total_rows'] = count($this->base_model->findAll());
$config['per_page'] = 2;
$this->pagination->initialize($config);
$data['result'] = $this->base_model->findLimit(2,$index);
$data['link'] = $this->pagination->create_links();
$this->load->view('index'.$data);
}
?>

모델 페이지

<?php
function __construct()
	{
		parent::__construct();
	}
	function findAll() 
	{
		return $this->db->get('base')->result();
	}
	function findLimit($limit, $row) 
	{
		return $this->db->get('base',$limit,$row)->result();
	}
	function baseLoad() 
	{ 
		$query=$this->db->get('base');
        return $query->result();
    }
?>

뷰 페이지

<?php foreach ($result as $row) { ?>

<tr>

<td><?=$row->base_idx;?></td>

<td><?=$row->base_code;?></td>

<td><?=$row->name;?></td>

<td><?=$row->han_value;?></td>

<td><?=$row->eng_value;?></td>

<td><?=$row->yn;?></td>

<td>

<button type="button" class="btn_modi">수정</button>

<button type="button" class="btn_del">삭제</button>

</td>

</tr>

<?php } ?>

 

<div>

<?php echo $link; ?>

</div>

 

당췌 무슨 에러일까요? ㅠㅠㅠㅠ

 

 다음글 하이브리드앱에서 자동로그인 문의 (2)
 이전글 config.php 파일 문의드립니다~~ (2)

댓글

kaido / 2018/02/04 19:33:57 / 추천 0
$this->load->view('index'.$data);

이렇게 

$this->load->view('index' , $data);


쉼표로 구분 하셔야 합니다.

 

minju84 / 2018/02/04 20:33:21 / 추천 0

헐......... 저런 말도 안되는 오타를.........

감사합니다.. 선배님 ㅠㅠㅠㅠ