?php
class News_model extends CI_Model {
public function __construct() {
$this->load->database();
}
... ]]에 동작하도록 되어 있다. 아래의 코드를 추가한다.
<code php>
public function get_news( $slug = FALSE )
{
if( $slug == FALSE ... <?php
class News extends CI_Controller {
public function __construct() {
paret::__construct();
$th... ('news_model');
} // 컨트롤러가 모델을 사용하는구나.
public function index() {
$data['news'] = $this->news_model->
timezone 정보]]
* [[https://www.php.net/manual/ja/function.date-default-timezone-set.php|date_default_timezo... 날짜 시간 정보 얻기
* [[https://www.php.net/manual/ja/function.date.php|날짜 함수 date()]] 링크
<code php>
<?php
$t
?php
class Pages extends CI_Controller {
public function view($page = 'home') { }
}
</code>
별로 티는 안나지만, 새... pages.php 파일의 view 함수를 변경 합니다.
<code php>
public function view($page = 'home')
{
if ( ! file_exists('appli