发现在通过网址的8080(Tomcat)端口访问,是可以上传和浏览文件的
而80(Apache)端口访问网站,不能使用,默认会去找php连接,
发现,干脆改掉访问地址
经查 ,需要修改FCKConfig.BasePath的默认,再调试发现,位于
/fckeditor/editor/js/fckeditorcode_ie.js文件第34行
var FCKConfig=FCK.Config={};if (document.location.protocol=='file:'){FCKConfig.BasePath=decodeURIComponent(document.location.pathname.substr(1));FCKConfig.BasePath=FCKConfig.BasePath.replace(////gi,'/');var sFullProtocol=document.location.href.match(/^(file/://{2,3})/)[1];if (FCKBrowserInfo.IsOpera) sFullProtocol+='localhost/';FCKConfig.BasePath=sFullProtocol+FCKConfig.BasePath.substring(0,FCKConfig.BasePath.lastIndexOf('/')+1);}else FCKConfig.BasePath=document.location.protocol+'//'+document.location.host+document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1);
修改为:
FCKConfig.BasePath=document.location.protocol+'//'+document.location.hostname+':8080'+document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1);
这样,就可以通过80端口正常访问了。
本文介绍了解决FCKeditor在80端口下无法正常访问的问题,通过修改FCKConfig.BasePath配置,使得在Apache服务器环境下也能正常使用。
1958

被折叠的 条评论
为什么被折叠?



