Fatal error: Can't use function return value in write context的问题
Posted FutureDrame
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Fatal error: Can't use function return value in write context的问题相关的知识,希望对你有一定的参考价值。
empty() 只检测变量,检测任何非变量的东西都将导致解析错误!
因此,我们不能拿empty来直接检测函数返回的值
if ((empty(session(‘admin_id‘)))) { echo json_encode([‘message‘ => ‘请先登录‘,‘code‘=> 300]); die; }
以上是错误代码
以上是关于Fatal error: Can't use function return value in write context的问题的主要内容,如果未能解决你的问题,请参考以下文章
Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist(
Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't
Fatal error: Can't use function return value in write context
Fatal error: Can't use function return value in write context的问题
mysql安转过程中出现的问题! Fatal error: Can't open and lock privilege tables: Table 'mysql.user' d
mysql安转过程中出现的问题! Fatal error: Can't open and lock privilege tables: Table 'mysql.user' d