【问题标题】:Fckeditor with Zend Framework带有 Zend 框架的 Fckeditor
【发布时间】:2012-09-26 21:11:31
【问题描述】:

如何使用 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',
)  

【问题讨论】:

  • 您能提供更多信息吗?您打算在哪里添加 ckeditor?
  • 我找不到任何适用于 zend 框架的 ckeditor 模块,如果您有任何请添加信息。 harikt.com/content/… 可能会有所帮助
  • 我认为 src 必须是 /public/js/fckeditor.js (in 08/15 ZF Application)

标签: zend-framework


【解决方案1】:

您可能需要创建 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就行了。

希望它有效。 问候

【讨论】:

    猜你喜欢
    • 2011-05-17
    • 1970-01-01
    • 1970-01-01
    • 2011-01-28
    • 1970-01-01
    • 2023-04-04
    • 1970-01-01
    • 2013-02-23
    • 1970-01-01
    相关资源
    最近更新 更多