Trying to setup responsive file manager with TinyMCE but get a 404 error

牧云@^-^@ 提交于 2020-08-06 05:42:48

问题


I use TinyMCE with responsivefilemanager but whenever I try to open the file manager I directly get a 404 error in that popup, and If you don't know, 404 means not found.

Here is my file structure

  Website's main parent folder/public_html
    myapp folder for the whole app
      my HTML & some PHP files which use TinyMCE and responsivefilemanager
      my tinyMCE's init.js file
      plugins folder for all my 3rd party plugins
        TinyMCE folder which contains TinyMCE itself
          other folders you find inside TinyMCE
          a plugins folder inside TinyMCE used for plugins related to it
            filemanager folder for the responsivefilemanager plugin

Here is my necessary code of config.php file which is inside the filemanager's config folder

<?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' => '/myapp/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/',
?>

My init.js file so I can initialize TinyMCE for my textarea

             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/filemanager/",
                filemanager_title: "Scintilla Filemanager for Lessons",
                external_plugins: {
                    "filemanager": "plugins/filemanager/plugin.min.js"
                }
            });

            tinymce.init(demoBaseConfig);

I know that there is some mistake over there which my eye isn't sharp enough to caught like maybe in the linking of those files or something like that which is giving me a 404 not found error, and I use HostGator's CPanel shared hosting to host my website.

来源:https://stackoverflow.com/questions/62461707/trying-to-setup-responsive-file-manager-with-tinymce-but-get-a-404-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!