今天在drupal上配置FCKEditor,经过了一番周折,总算能够上传图片了。
首先是好不容易在,FCKEditor的配置中,找到了build-in browser和允许上传附件的选项,勾上之后,出现如下提示:
You are using a feature that requires manual integration into config.php (either built-in filebrowser or quick uploads are enabled in the Advanced profile). Read instructions about enabling built-in file browser and add "require_once ..." statement in editor/filemanager/connectors/php/config.php.
然后搜索到如下网址:
http://drupal.org/node/324053
http://drupal.org/node/277657
有一段话:
Features:
11) Some people have problems with upgrading FCKeditor: they forget to add
require_once "../../../../../filemanager.config.php";
to the config.php
我们才知道要加的那句话是:
require_once "../../../../../filemanager.config.php";
我们尝试把它加在config.php的代码最前面和最后面,都不行,出现如下提示:
You have added "require_once ..." statement in editor/filemanager/connectors/php/config.php, but in the wrong line.'
搜索下面关键字:
require_once ..." statement in editor/filemanager/connectors/php/config.php, but in the wrong line.
打开了http://www.sambazwalm.be/drupal/sites/all/modules/fckeditor/fckeditor.install
它完全就是一份源代码,能在里面找到答案吗?
经过查找发现,它提示我们的错误信息赫然出现,相关代码如下:
if ($userfiles_absolute_path_line && $force_single_extension_line && (
$require_once_line < $userfiles_absolute_path_line || $require_once_line > $force_single_extension_line)) {
return t('You are using a feature that requires manual integration into config.php (either built-in filebrowser or quick uploads are enabled in the !profile profile). You have added "require_once ..." statement in editor/filemanager/connectors/php/config.php
从中猜测,require_once那一行应该放在userfiles_absolute_path_line 和force_single_extension_line 之间。
连猜带蒙,把它放在config的两个配置之间,果然OK了。
这之后发现,图片文件名为英文名的,完全能够上传了。中文名暂时不支持。
本文转sinojelly51CTO博客,原文链接:http://blog.51cto.com/sinojelly/222633
,如需转载请自行联系原作者