php项目低版本升级高版本的时候,会遇到个错误:[8192]Non-static method app\api\controller\sss::xxx should not be called statically 工具/原料 php 方法/步骤 1 原因:php高版本的语法和低版本有差异造成的,php不做向后兼容,要不就使用低版本要不就修改代码。2 高版本:静态方法里面不能调用非静态方法。...
Ubuntu使用——15(thinkphp路由报错Non-static method think\Route::get() should not be called statically) 在route.php中添加代码: usethink\Route;Route::get('/',function(){return'hello world'; }); 在浏览器中输入http://localhost/tp5-git/public/index.php,报错: [8192]ErrorExceptionin route.php...
1, 打开 xampp/php/php.ini 配置文件, 把 error_reporting = E_ALL | E_STRICT 替换成 error_reporting = E_ALL & ~E_STRICT ,把 display_errors = On 替换成 display_errors = Off ,然后保存,重启服务器,刷新页面。 2,也可打开joomla 文件夹下的 configuration.php, 把error_reporting = "-1" 替换...
Fatal error: Non-static method test::test() cannot be called statically in /home/×××/test.php on line 7 Call Stack: 0.0002 332548 1. {main}() /home/×××/test.php:0 这个时候,可能大家就会认为静态调用非静态方法是行不通的了,但其实,结论下的过早了,因为test()这个方法比较特殊,与类同...
ecshop 方法/步骤 1 安装的时候出现错误Non-static method cls_image::gd_version() should not be called statically in includes\lib_installer.php on line 31进入install/include目录打开文件 找到31行return cls_image::gd_version();修改成$p = new cls_image();return $p->gd_version();还有根目录的...
PHP Stack trace: PHP 1. {main}() /root/dev_Codes_All/phpComSelect/fopenSelectWithRaspberry.php:0 实践下面Ok,能去掉提示: PHP Strict Standards: Non-static method错误的解决方法 在程序添加了error_reporting(E_ERROR | E_WARNING | E_PARSE)后解决问题!
public static function __callStatic($method,$args) { $res = call_user_func_array([self::$_instance, $method], $args); return $res; } 1. 2. 3. 4. 5. 6. 测试得知,当类中非静态函数a()存在时,静态调用A::a()会报错不能静态调用,Deprecated: Non-static method lib\Request::action()...
Strict Standards: Non-static method Base::show() should not be called statically in C:\phpStudy\PHPTutorial\WWW\caiji3\test.php on line 28 说不是一个静态方法,调用方式没对,证明没有进入callStatic 方法 这是为什么,难道是php版本没对???
print('Non-static call'); } } A::b(); ?> 以上程序执行输出结果为: Deprecated:Non-staticmethod A::b()shouldnotbe called staticallyin...Non-staticcall password_hash() 随机因子选项 函数原 salt 量不再需要由开发者提供了。函数内部默认带有 salt 能力,无需开发者提供 salt 值。
这是一个关注PHP技术的个人博客,提供一个互联网从业者的学习成果和工作经验总结。 Non-static method Redis::set() cannot be called statically