简体   繁体   English

ATK4致命错误

[英]ATK4 Fatal Error

Fatal error: Class 'h1' not found in /home/iracersr/public_html/atk4/lib/AbstractObject.php on line 131 致命错误:在第131行的/home/iracersr/public_html/atk4/lib/AbstractObject.php中找不到类'h1'

I have installed the latest version and here is the code im using. 我已经安装了最新版本,这是我正在使用的代码。 Any suggestions? 有什么建议么?

<?php
class page_index extends Page {
    function init(){
        parent::init();
        $p=$this;
        //Get Articles
        $articles=$this->add('Model_News')->getRows();

        $p->add('h1')->set('Latest News');

        foreach($articles as $article){
            $content=$this->add('view',null,null,array('view/blog'));
            $content->template->set('title',$article['title']);
            $content->template->set('content',$article['content']);
        }
    }
}

区分大小写。

->add('H1');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM