với PHP bình thường thì Em chỉ cần đưa 1 đoạn scripts vào là ok, nhưng với ZF Em thử đủ kiểu nó không nhận và còn báo lỗi là chưa có function fckeditorAction
Fatal error: Uncaught exception 'Zend_Controller_Action_Exception' with message 'Action "fckeditor" does not exist and was not trapped in __call()' in D:\xampp\htdocs\ZF\New\library\Zend\Controller\Action.php:477 Stack trace: #0 D:\xampp\htdocs\ZF\New\library\Zend\Controller\Action.php(504): Zend_Controller_Action->__call('fckeditorAction', Array) #1 D:\xampp\htdocs\ZF\New\library\Zend\Controller\Dispatcher\Standard.php(293): Zend_Controller_Action->dispatch('fckeditorAction') #2 D:\xampp\htdocs\ZF\New\library\Zend\Controller\Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 D:\xampp\htdocs\ZF\New\public\index.php(40): Zend_Controller_Front->dispatch() #4 {main} thrown in D:\xampp\htdocs\ZF\New\library\Zend\Controller\Action.php on line 477
Code file add.phtml khi đưa đoạn scripts vào
- Mã: Chọn tất cả
<script type="text/javascript" src="../../fckeditor/fckeditor2.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( "noidung" ) ;
oFCKeditor.BasePath = "fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
<form id="form1" name="form1" method="post" action="">
<table width="800" border="0" align="center">
<tr>
<td colspan="2" align="center"><span style="color:#FF0000; font-weight:bold;">Thêm mới tin tức</span></td>
</tr>
<tr>
<td></td>
<td><span style="color:#FF0000"><?=$this->tb_loi;?></span></td>
</tr>
<tr>
<td width="222">Tiêu đề: </td>
<td width="568"><label>
<?=$this->formText('tieude',$this->arrInput['tieude'],array('size'=>'60'));?>
</label></td>
</tr>
<tr>
<td width="222">Danh mục: </td>
<td width="568"><label>
<?=$this->formSelect('danhmuc',$this->arrInput['danhmuc'],null,$this->danhmuc);?>
</label></td>
</tr>
<tr>
<td valign="top">Nội dung: </td>
<td><label>
<?=$this->formTextarea('noidung',$this->arrInput['noidung'],array('rows'=>'6','cols'=>'60'));?>
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<?=$this->formSubmit('Submit','Save','');?>
</label></td>
</tr>
</table>
</form>
Ai coi giúp Em nha
