javascriptphpckeditorkcfinder

I have integrated kcfinder with config.js file but still browse server option not visible


I have integrated kcfinder with config.js but the browse server button is not visible.

i am using xampp server and my host file structure as per below

xampp -> htdocs -> ckeditor_test -> admin -> index.php

xampp -> htdocs -> ckeditor_test -> ckeditor -> config.js

xampp -> htdocs -> ckeditor_test -> kcfinder

And my index.php code & confing.js integrated code is as below.

index.php

<html>
<head>
    <title></title>
    <script type="text/javascript" src="../ckeditor/ckeditor.js">
    </script>
</head>
<body>
    <textarea name="editor" class="ckeditor"></textarea>
</body>

config.js

 CKEDITOR.editorConfig = function(config) {
// ...
   config.filebrowserBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=files';
   config.filebrowserImageBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=images';
   config.filebrowserFlashBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=flash';
   config.filebrowserUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=files';
   config.filebrowserImageUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=images';
   config.filebrowserFlashUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=flash';
// ...
};

Solution

  • Try to clear your browser cache. Also, since your index.php is inside admin folder, you need to go up a folder for kcfinder like this:

     CKEDITOR.editorConfig = function(config) {
    // ...
       config.filebrowserBrowseUrl = '../kcfinder/browse.php?opener=ckeditor&type=files';
       config.filebrowserImageBrowseUrl = '../kcfinder/browse.php?opener=ckeditor&type=images';
       config.filebrowserFlashBrowseUrl = '../kcfinder/browse.php?opener=ckeditor&type=flash';
       config.filebrowserUploadUrl = '../kcfinder/upload.php?opener=ckeditor&type=files';
       config.filebrowserImageUploadUrl = '../kcfinder/upload.php?opener=ckeditor&type=images';
       config.filebrowserFlashUploadUrl = '../kcfinder/upload.php?opener=ckeditor&type=flash';
    // ...
    };