| 제목 | model 에서 보낸 값이 view에서 출력이안되요;; | ||
|---|---|---|---|
| 글쓴이 | 제부도소년 | 작성시각 | 2013/05/09 09:44:43 | 
|  | |||
| contoller 에서 model 불러서 view로 값 전달했는데 출력이 안되네요.. :::::::::::controller <?php class Main extends CI_Controller {  public function __construct() {   parent::__construct();  }  public function index($idx="1"){   $this->show($idx);  }  public function show($type){   $model = $this->load->model("main_model");   $data['show_main']=$this->main_model->main_row(); // 여기엔 값이 이미지 파일명으로 들어갑니다.   $this->load->view('include/top');   $this->load->view('main/index',$data);   $this->load->view('include/bottom');  } } ?> :::::::::::model <? class Main_model extends CI_Model{  function __construct(){   parent::__construct();   $this->DB = $this->load->database('109', TRUE); //183 load  }  public function main_row() {   $main_row = '/test_img/img.jpg';   return $main_row;  } ?> :::::::::::view <!-- <?=$data?> <?=print_r($data);?> --> <div class="main_top" style="background-image:url(<?=$data['show_main']?>);">  <?php $this->load->view('include/left_main'); ?> </div> view의 출력 3가지 다 처리가 되지않습니다. 왜그런걸까요? ㅠㅠ; | |||
| 다음글 | css가 먹질 않습니다!!! 제발좀 도와 주세요!!! (4) | ||
| 이전글 | 파일 업로드시 rename 관련 질문입니다. (5) | ||
| 
                                케이든
                                /
                                2013/05/09 10:00:52 /
                                추천
                                0
                             
                                 <?php echo $show_main ?>
                             | 
| 
                                제부도소년
                                /
                                2013/05/09 10:04:34 /
                                추천
                                0
                             
                                 감사합니다~~
                             | 
| 
                                변종원(웅파)
                                /
                                2013/05/09 10:18:22 /
                                추천
                                0
                             
                                뷰 매뉴얼 다시 한번 꼼꼼히 읽어보세요
                             |