配置fckeditor 实现图片的上传
更新时间:2009年11月26日 17:56:26 作者:
配置fckeditor 实现图片的上传
1.应该修改editor\filemanager\upload\php\editor\filemanager\browser\default\connectors\php\config.php 中的$Config['Enabled'] = true ;
2.应该修改editor\filemanager\upload\php\editor\filemanager\upload\php\config.php 中的$Config['Enabled'] = true ;
3.应该修改editor\filemanager\upload\php下util.php里面的getrootpath函数
function GetRootPath() { $sRealPath = realpath( '.' ) ; $sRealPath=str_replace('\\','/',$sRealPath); $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; return $sRealPath.'/'; }
还有editor\filemanager\browser\default\connectors\php下io.php里面的getrootpath函数
function GetRootPath() { $sRealPath = realpath( '.' ) ; $sRealPath=str_replace('\\','/',$sRealPath); $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; return $sRealPath.'/'; }
然后修改editor\filemanager\browser\default\connectors\php里面config.php文件的$Config['UserFilesPath']变量以及editor\filemanager\upload\php下config.php里面的$Config['UserFilesPath']变量就行了。不过图片在编辑器里面不能看见,但是显示成内容的时候没有问题
2.应该修改editor\filemanager\upload\php\editor\filemanager\upload\php\config.php 中的$Config['Enabled'] = true ;
3.应该修改editor\filemanager\upload\php下util.php里面的getrootpath函数
复制代码 代码如下:
function GetRootPath() { $sRealPath = realpath( '.' ) ; $sRealPath=str_replace('\\','/',$sRealPath); $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; return $sRealPath.'/'; }
还有editor\filemanager\browser\default\connectors\php下io.php里面的getrootpath函数
复制代码 代码如下:
function GetRootPath() { $sRealPath = realpath( '.' ) ; $sRealPath=str_replace('\\','/',$sRealPath); $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; $sRealPath = substr( $sRealPath, 0, strrpos( $sRealPath, '/' ) ) ; return $sRealPath.'/'; }
然后修改editor\filemanager\browser\default\connectors\php里面config.php文件的$Config['UserFilesPath']变量以及editor\filemanager\upload\php下config.php里面的$Config['UserFilesPath']变量就行了。不过图片在编辑器里面不能看见,但是显示成内容的时候没有问题
相关文章
ie9后浏览器fckeditor无法上传图片、弹出浮层内容不显示的解决方法
升级到IE9后,fckeditor在IE9里的弹出浮动层会出现bug,里面的内容不会出现。原因是IE9不支持var $=document.getElementById;这样的写法了2014-01-01
解决SyntaxHighlighter 代码高亮不换行问题的解决方法
用SyntaxHighlighter 语法高亮插件的朋友可能都遇到过代码显示不换行的问题,这个问题在网上也找不到什么解决办法,一直困扰了我很久,今天算是把它解决了,办法其实简单,下面说下如何解决2014-11-11
针对PHP环境下Fckeditor编辑器上传图片配置详细教程
今天介绍Fckeditor上传图片功能在PHP中的配置方法,涉及Fckeditor上传图片的上传路径配置、限制Fckeditor上传图片大小设置、Fckeditor上传图片文件名重名及乱码解决方法以及针对上传图片添加水印功能的实现方法,只要掌握了以上四点,Fckeditor在大部分PHP类型网站中的应用都能解决2014-04-04
Ueditor百度编辑器的Html模式自动替换样式的解决方法
百度的Ueditor编辑器出于安全性考虑,用户在html模式下粘贴进去的html文档会自动被去除样式和转义。虽然安全的,但是非常不方便。做一下修改把这个功能去掉,需要的朋友可以参考下2017-03-03
页面嵌入Windows Media Player播放器代码需要注意的
在页面中插入WMP确实是个令人头疼的一件事。这里简单的说明下,希望对需要朋友有所帮助。2010-07-07


最新评论