Search code examples
phpfckeditor

CK editor and missing image URL


I have integrated CKeditor with my admin panel (php) I have writtien a function for calling editor:

function editor(){
$txt = '<script type="text/javascript">
        CKEDITOR.replace( "kabst",{
            filebrowserUploadUrl : "'.UPLOAD_SCRIPT.'" });                          
            </script>';
    return $txt;
}

and define:

 define("UPLOAD_SCRIPT", $_SERVER['DOCUMENT_ROOT']."/cms/dashboard/upload.php");

I have error: NOT FOUND in ck upload. But upload.php is working. What is wrong in my code? Thanks in advance


Solution

  • Maybe use $_SERVER['SERVER_ROOT'] instead of DOCUMENT_ROOT ?