GoDaddy上的CKEditor和KCfinder图像预览 [英] CKEditor and KCfinder image preview on GoDaddy
问题描述
我在GoDaddy托管上通过CKEditor上的KCFinder预览图像时遇到问题.
I am having a problem with preview of image through KCFinder on CKEditor on GoDaddy hosting.
当我从KCFinder中选择图像时,预览已正确加载到我的本地计算机上,但是当我在GoDaddy上进行检查时,预览没有正确显示.从下面的图像中可以看出差异.
When I select the image from KCFinder the preview is loaded correctly on my local machine, but when I check on GoDaddy it is not showing correctly. Difference can be seen from below images.
我已经在CKEditor中配置了文件浏览器,如下面的代码片段所示.
I have configured the file browser in CKEditor as shown in below snippet.
config.filebrowserBrowseUrl = '../admin/kcfinder/browse.php?type=files';
config.filebrowserImageBrowseUrl = '../admin/kcfinder/browse.php?type=media';
config.filebrowserFlashBrowseUrl = '../admin/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = '../admin/kcfinder/upload.php?type=files';
config.filebrowserImageUploadUrl = '../admin/kcfinder/upload.php?type=media';
config.filebrowserFlashUploadUrl = '../admin/kcfinder/upload.php?type=flash';
KCFinder会话如下
And the KCFinder session is as follows
$_SESSION['KCFINDER']['uploadURL'] = "../upload";
$_SESSION['KCFINDER']['uploadDir'] = "../upload";
$_SESSION['KCFINDER']['disabled'] = false;
我的本地主机中的图像预览.
Image preview in my localhost.
GoDaddy托管上的图像预览
Image preview on GoDaddy hosting
主要问题我无法在URL中获得"upload/"目录.您可以在以上图像中看到差异.
The main problem I am unable to get the "upload/" directory in URL. You can see the difference in above images.
任何人都可以帮忙,如何解决此问题?
Can anyone help, how to resolve this problem?
谢谢.
推荐答案
我为uploadURL使用了绝对路径,并且有效!
I used the absolute path for the uploadURL and it worked!
这篇关于GoDaddy上的CKEditor和KCfinder图像预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!