配置fckeditor 实现图片的上传
程序员文章站
2022-03-07 08:52:53
1.应该修改editor\filemanager\upload\php\editor\filemanager\browser\default\connectors\php\...
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']变量就行了。不过图片在编辑器里面不能看见,但是显示成内容的时候没有问题