Help understanding PHP5 error

后端 未结 4 488
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-28 08:29

In short.. question is... \"Say what?\" To expand... \"I don\'t get the error\"

Strict Standards: Non-static method Pyro\\Template::preLoad() should not b

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-28 09:12

    preLoad function isn't static. ti should look like this:

    public static function preLoad($template, $page) {
            ob_start();
    
            include( VIEWS . "{$template}.php");
    
            $buffer = ob_get_contents();
            @ob_end_clean();
            return $buffer;
        }
    

提交回复
热议问题