1446161602 发表于 2013-7-23 17:50:35

CodeIgniter 求助 查过没有查到

<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>这里的{elapsed_time}能自动替换
可是我的<title>{webTitle}</title>这个{webTitle}不能,
我在welcome.php中
    public function index()
    {

      $data = array(
      'webTitle' => 'My Title',
      'heading' => 'My Heading',
      'message' => 'My Message'
      );
      $this->load->view('welcome_message',$data);
    }

手册上是这样写的<title><?php echo $webTitle; ?></title>,这样写是可以的,可是我想用{webTitle}这种形式,简单
哪位指点下,谢谢

魔鬼 发表于 2013-7-24 10:47:24

看模板解析器类

$this->parser->parse('welcome_message',$data);

Raphael 发表于 2013-7-25 10:56:01

本帖最后由 Raphael 于 2013-7-25 10:58 编辑

樓上正解{:soso_e100:}
页: [1]
查看完整版本: CodeIgniter 求助 查过没有查到