Help understanding PHP5 error

后端 未结 4 487
佛祖请我去吃肉
佛祖请我去吃肉 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:05

    Well the preLoad function is not static. Which means only an object of the class Template can use this method. A static method exists indepedently of any object of the class.

    Template::preLoad is a static call : you didn't create a Template object, then call the preLoad method. So basically, you've got two solutions :

    • Making preLoad static;
    • Creating a Template object, and then call its preLoad function.

提交回复
热议问题