开发者

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

开发者 https://www.devze.com 2022-12-22 00:44 出处:网络
http://php.net/manual/en/mysqli.init.php $ConnectionResource = mysqli::init(); The above code fails with:

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

$ConnectionResource = mysqli::init();

The above code fails with:

Fatal error: Non-static method mysqli::init() cannot be cal开发者_运维知识库led statically

How come?


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

精彩评论

暂无评论...
验证码 换一张
取 消