当前位置:主页 > 查看内容

配置fckeditor 实现图片的上传

发布时间:2021-04-21 00:00| 位朋友查看

简介: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'] =……
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']变量就行了。不过图片在编辑器里面不能看见,但是显示成内容的时候没有问题

本文转载自网络,原文链接:https://m.jb51.net/article/21106.htm
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐