PHP5: Non-static method should not be called statically
今天发现PHP5调用静态方法的时候出现如下的错误:
http://www.zhaiduo.com/2008/06/php5-non-static-method-should-not-be-called-statically/
Error message: Non-static method My_Class::mystatic() should not be called statically
根据网上搜索的结果:
These messages are generated in compile time, all the functions are
executed AFTER that, so error_reporting(0); does not have any effect and
this is expected behaviour. – 来源
这个错误只是一个E_STRICT错误(Runtime Notice),不会影响其后的程序执行。解决办法可以隐藏E_STRICT的报告。
另外:关于File_PDF找不到File/PDF/fonts/courierb.php的问题。
File_PDF最新源文件里面也没有这个courierb.php文件,先暂时复制courier.php为courierb.php。
This entry was posted on Wednesday, June 25th, 2008 at 12:53 pm and is filed under PHP. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
http://cto.csdn.net/Article.aspx?Name=jinglizhong&pointid=2610
php5中strict standards错误问题
发表时间:2010-3-22 10:25:10
在使用call_user_func和call_user_func_array函数时,偶尔会遇到strict standards错误,网上很多资料说屏蔽掉错误信息。
其实治本的办法有两个:
1、回调的函数使用静态方法,也就是用静态函数
2、call_user_func函数中的类使用对象,而不是类名
这里就不举例了。