tags:

views:

192

answers:

1

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

A: 

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

Rob
With 'SERVER_ROOT' its ok but with clicking "ok" there is an error : Image source URL is missing.
Never heard of that error before to be honest, but sounds like it's getting the wrong path of the uploaded file. Maybe you can find something about it on google
Rob