首先,在你的config.js文件里添加如下代码:
ckeditor.editorconfig = function( config )
{
config.filebrowserimageuploadurl = './upload.php?type=img';
config.filebrowserflashuploadurl = './upload.php?type=flash';
};
以上的配置是上传要处理到的文件的地址,你可以根据自己情况进行修改。upload.php文件如下:
$config[$type._size]*1024)
mkhtml($fn,,上传的文件不能超过.$config[$type._size].kb!);
//$filearr=explode(.,$_files['upload']['name']);
//$filetype=$filearr[count($filearr)-1];
$file_abso=$config[$type._dir]./.$config['name']...$filetype;
$file_host=$_server['document_root'].$file_abso;
if(move_uploaded_file($_files['upload']['tmp_name'],$file_host))
{
mkhtml($fn,$config['site_url'].$file_abso,$config['message']);
}
else
{
mkhtml($fn,,文件上传失败,请检查上传目录设置和目录读写权限);
}
}
}
//输出js调用
function mkhtml($fn,$fileurl,$message)
{
$str='';
exit($str);
}
?>
附上这个upload.php文件的下载地址http://download.csdn.net/source/1795185
