它与PHP或Apache配置有关吗?
错误讯息:
Non-static method SessionComponent::write() should not be called statically, assuming $this from incompatible context [APP\View\Households\add.ctp, line 64]
第64行:
SessionComponent::write('ChildCounter', -1);
答案 0 :(得分:7)
SessionComponent::write() should not be called statically
那你为什么这么做? :)
如果记录正确使用它:
$this->Session->write()
当然,在正确的范围内(控制器/组件)。
或使用静态CakeSession访问:
CakeSession::write()
您APP中的其他任何地方。