这是我目前正在使用的代码,但无法理解如何插入 ajax 代码
我在这个网站上阅读了更多帖子,但我仍然无法理解我是如何插入 ajax 代码的
<?php
class FacController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function deleteAction()
{
if ($this->getRequest()->isPost()) {
$del = $this->getRequest()->getPost('del');
if ($del == 'Yes') {
$id = $this->getRequest()->getPost('id');
$details = new Application_Model_DbTable_Details();
$details->deleteDetails($id);
}
$this->_helper->redirector('index');
} else {
$id = $this->_getParam('id', 0);
$details = new Application_Model_DbTable_Details();
$this->view->details = $details->getDetails($id);
}
}
}