日期:2014-05-17  浏览次数:20433 次

ckeditor finderphp整合 php实现文件上传

文件目录:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type='text/javascript' src='../editor/ckeditor/ckeditor.js'></script>
<script type='text/javascript' src='../editor/ckfinder/ckfinder.js'></script>
<style type="text/css">
#edit {
margin:0px auto;
margin-left:60px;
}
</style>


<title>Insert title here</title>
</head>


<body>
<div id='edit'>
<form action="0001.php" method="post">
<textarea cols="80" id="content" name="content" rows="10"></textarea>
<script type="text/javascript">
var obj = CKEDITOR.replace('content');
CKFinder.SetupCKEditor(obj, '/editor/ckfinder/')
</script>
<input type='submit' value="submit" />
</form>
</div>
</body>

</html>

配置 ckeditor/config.js

 config.font_names = '宋体;楷体_GB2312;新宋体;黑体;隶书;幼圆;微软雅黑;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana;"Lucida Sans Unicode", "Lucida Grande"';
    config.filebrowserBrowseUrl = '/ckfinder/ckfinder.html';
    config.filebrowserImageBrowseUrl = '/ckfinder/ckfinder.html?type=Images';
    config.filebrowserFlashBrowseUrl = '/ckfinder/ckfinder.html?type=Flash';
    config.filebrowserUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=File';
    config.filebrowserImageUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
    config.filebrowserFlashUploadUrl = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';

效果截图: