嗨,当我单击 TinyMCE 工具栏中的 responsivefilemanager 上传文件按钮时,我会收到此 500 内部服务器错误。
我有以下 js TinyMCE 初始化代码:
<script>
tinymce.init({
selector: "textarea",
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor responsivefilemanager code codesample"
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | codesample | forecolor backcolor | print preview code ",
image_advtab: true,
branding: false,
external_filemanager_path: "plugins/tinymce/plugins/filemanager/",
filemanager_title: "Filemanager for projecthub",
external_plugins: {
"filemanager": "plugins/filemanager/plugin.min.js"
}
});
</script>
使用此文件结构:
-project folder name
-index.php (which also apparently contains the javascript TinyMCE initialization code)
-plugins folder (which contains TinyMCE folder)
-TinyMCE folder
-plugins folder (which contains all the plugins for TinyMCE)
-responsivefilemanager folder
-config
-config.php file
这是我的基本 config.php 代码(代码与默认的 responsivefilemanager 配置文件完全相同,但编辑了上传文件夹和缩略图文件夹 URL,我无法发布整个代码,因为 StackOverflow 不允许超过 33000帖子上的字符)
<?php
/*
|--------------------------------------------------------------------------
| DON'T TOUCH (base url (only domain) of site).
|--------------------------------------------------------------------------
|
| without final / (DON'T TOUCH)
|
*/
'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"). "://". @$_SERVER['HTTP_HOST'],
/*
|--------------------------------------------------------------------------
| path from base_url to base of upload folder
|--------------------------------------------------------------------------
|
| with start and final /
|
*/
'upload_dir' => '/projecthub/uploads/',
/*
|--------------------------------------------------------------------------
| relative path from filemanager folder to upload folder
|--------------------------------------------------------------------------
|
| with final /
|
*/
'current_path' => '../../../../uploads/',
/*
|--------------------------------------------------------------------------
| relative path from filemanager folder to thumbs folder
|--------------------------------------------------------------------------
|
| with final /
| DO NOT put inside upload folder
|
*/
'thumbs_base_path' => '../../../../thumb/',
/*
|--------------------------------------------------------------------------
| path from base_url to base of thumbs folder
|--------------------------------------------------------------------------
|
| with final /
| DO NOT put inside upload folder
|
*/
'thumbs_upload_dir' => '../../../../thumb/'
?>