Strict Standards: Only variables should be assigned by reference PHP 5.4

我的未来我决定 提交于 2019-11-26 22:42:56

You should remove the & (ampersand) symbol, so that line 4 will look like this:

$conn = ADONewConnection($config['db_type']);

From php's manual on assignment by reference:

As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.

It's because you're trying to assign an object by reference. Remove the ampersand and your script should work as intended.

mkuseli qupe

I had this issue too.

I did not see any change after altering:

error_reporting = E_ALL

display_errors = Off

Closed my browser, and stopped and started Apache in Xamp en error messages were gone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!