错误:致命错误:在非对象上调用成员函数save() IndexController.php
$model = Mage::getModel('contacts/contacts');
$model->setGuestName( trim($post['name']) );
$model->setGuestEmail(trim($post['email']));
$model->setGuestTelephone(trim($post['telephone']));
$model->setGuestComments(trim($post['comment']));
$model->setGuestAttachment(trim($post['attachment']));
$model->Mage_Core_Model_Abstract->save( );
的Config.xml
<models>
<contacts>
<class>Mage_Contacts_Model</class>
<resourceModel>Contacts_Mysql4</resourceModel>
</contacts>
<contacts_Mysql4>
<class>Mage_Contacts_Model_Mysql4</class>
<entities>
<contacts>
<table>contact_details</table>
</contacts>
</entities>
</contacts_Mysql4>
</models>