【发布时间】:2012-07-06 07:45:24
【问题描述】:
我需要在组件中加载模型以将相关模型的数据保存在该组件本身中。
我的组件名称是 ImagemuploadComponent
在这个组件中,我想加载 Attachement 模型。 我已经尝试了以下代码,但没有奏效。 (在 cakephp 1.3 中运行良好)
$Attachment = ClassRegistry::init('Attachment');
$this->loadModel('Attachment');
【问题讨论】:
标签: cakephp cakephp-2.0 cakephp-model