如何使用Zend实现Fckeditor。
我把这个放在视图上:
src="/js/fckeditor.js"></script>..etc..
<textarea name="profileDescription" id="ckeditor"..etc..
window.onload = function()
{
if(document.getElementById('ckeditor')) {
var oFCKeditor = new FCKeditor('ckeditor') ;
oFCKeditor.BasePath = "<?php echo BASE_URL; ?>js/fckeditor.js";
oFCKeditor.Height = 500;
oFCKeditor.Width = 700;
oFCKeditor.ReplaceTextarea() ;
}
};我得到这个错误:应用程序错误
异常信息:
消息:找不到资源'js‘
请求参数:
array (
'controller' => 'js',
'action' => 'fckeditor.jseditor',
'module' => 'default',
'InstanceName' => 'ckeditor',
'Toolbar' => 'Default',
) 发布于 2011-02-01 01:35:09
您可能需要创建htaccess来读取此类文件!
这是我对ZF项目的默认htaccess:
AddDefaultCharset utf-8
ServerSignature off
SetEnv APPLICATION_ENV development
<IfModule mod_headers.c>
Header unset Server
Header unset X-Powered-By
</IfModule>
<IfModule mod_php5.c>
php_flag register_globals off
php_flag magic_quotes_gpc off
</IfModule>
RewriteEngine On
RewriteBase /proj_rodrigo/public/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]也许你的htaccess有点不同,就像下面这部分:
RewriteRule !\.(phtml|swf|jar|js)index.php如果这是您的格式,只需在()信息中添加JS即可。
希望它能起作用。问候
https://stackoverflow.com/questions/4754697
复制相似问题