0

我的网站是带有 kcfinder 和 ckeditor 的 Codeigniter,我的问题是当我尝试上传和加载图像时,此图像会正确上传到自动创建的文件夹/assets/kcfinder/.thumbs/images/中,但是当我从服务器中选择图像时,网址错误,我看不到。如何设置正确的路径?

截屏

4

3 回答 3

0

您还可以使用以下代码来设置您的 KcFinder 配置设置:

<?php
/**
 * KcFinder has a SESSION key name 'KCFINDER'
 * You can use this as setup your dynamic config vales
 * if you set uploadURL and uploadDir via SESSION, KcFinder ignore config.php
 * to get these values and it start using SESSION values
 */
$_SESSION['KCFINDER'] = array(
    'disabled'  => false,
    'uploadURL' => 'http://www.example.com/upload',
    'uploadDir' => 'var/htdocs/www/upload'
);

更多:见链接

于 2017-04-25T18:35:57.013 回答
0

我已经解决了这个问题。在 ../assets/kcfinder/config.php 我改变了:

'uploadURL' 从 "upload" 到 Absolute url 和在 'uploadDir' 从 "" 到 "upload" 并且成功了!

不管怎么说,还是要谢谢你。

于 2016-03-28T23:54:07.343 回答
0

我认为问题在于您需要在图像路径中添加基本网址

base_url() 。'图片/' 。$img;

于 2016-03-28T23:37:03.000 回答