Non-static method mysqli::init() cannot be called statically

前端 未结 1 1649
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 22:15

http://php.net/manual/en/mysqli.init.php

$ConnectionResource = mysqli::init();

The above code fails with:

Fatal error: Non-static m

相关标签:
1条回答
  • 2021-01-13 23:03

    that's just stupid notation used in the manual, obviously they use class->property and class::method without regard for the actual language and its distinction between instance- and class-member access (-> vs. ::). see example 1 at http://www.php.net/manual/en/mysqli.real-connect.php

    0 讨论(0)
提交回复
热议问题