3
我相信这比我做的更简单。php undefined属性的一个对象
,我得到的错误...
Notice (8): Undefined property: Cake\Database\Connection::$config [... line 73]
上线73码...
Line 72: debug($conn);
Line 73: debug($conn->config);
这里是$康恩等于
$conn = object(Cake\Database\Connection) {
'config' => [
'password' => '*****',
'username' => '*****',
'host' => '*****',
'database' => '*****',
'driver' => 'Cake\Database\Driver\Postgres',
'persistent' => false,
'encoding' => 'utf8',
],
}
谁知道为什么$ conn-> config是不是正确的语法?
配置是对象中的一个公共变量吗? –