如何包含文档根目录之外的CKeditor

时间:2010-04-29 08:25:24

标签: php apache lamp ckeditor

是否可以在文档根应用程序中使用位于文档根目录之外的CKeditor?

例如我的目录结构如下:

    My Documentroot

    C://xampp/htdocs/example.com

    My CKeditor is outside and parallel to document root say

    C://xampp/lib/ckeditor

如何在C://xampp/lib/ckeditor/ckeditor

中的应用页面中调用C://xampp/htdocs/example.com/editor.php中的ckeditor.js

3 个答案:

答案 0 :(得分:1)

由于CKEditor是Javascript,它必须驻留在文档根目录中,否则您将无法包含它。

答案 1 :(得分:1)

如果您使用的是Apache,则可以在VirtualHost(或httpd.conf)网站的httpd-vhosts.conf部分设置别名:

Alias /ckeditor C:/xampp/lib/ckeditor

正如@wimvds所说,文件必须才能以某种方式访问​​浏览器。

答案 2 :(得分:-1)

../../lib/ckeditor/ckeditor

../是父目录。