이런오류는 어떻게해야되나요
ㅠㅠ
board.php
class Board extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->model('board_m');
}
public function index()
{
$this->lists();
}
public function _remap($method)
{
//헤더 include
$this->load->view('header_v');
if (method_exists($this, $method) )
{
$this->{"{$method}"}();
}
// 푸터 include
$this->load->view('footer_v');
}
public function lists()
{
$data['list'] = $this->board_m->get_list($this->uri->segment(3));
$this->load->view('board/list_v',$data);
}
}
board_m.php
class Board_m extends CI_Model
{
function __construct()
{
parent::__construct();
}
function get_list($table='ci_board')
{
$sql = "SELECT * FROM ".$table." ORDER BY board_id DESC";
$query = $this->db->query($sql);
$result = $query->result();
// $result = $query->result_array();
return $result;
}
}
header.php
CodeIgniter
만들면서 배우는 CodeIgnter
실행 예제
list_v.php
foreach ($list as $lt)
{
?>
| 번호 |
제목 |
작성자 |
조회수 |
작성일 |
board_id;?>
|
subject;?>
|
user_name;?> |
hits;?> |
reg_date));?> |
}
?>
footer_v.php
CodeIgniter한국 사용자포럼
Copyright by
웅파.
segment 가 사용이안되는것같은데 아무리해도안되네요..ㅠㅠ
도와주세요ㅠㅠ
책 관련 질문 게시판이 따로 있습니다. 그곳에 오탈자도 등록이 되어 있구요.
http://cikorea.net/cibook/view/5/page/1/ 2번째 댓글 참고하시면 해결이 되실 겁니다.
감사합니다.