您的位置:首页 > 运维架构 > Tomcat

FCKeditor 在Apache+Tomcat整合的环境中使用调试的问题

2009-09-15 10:26 816 查看
发现在通过网址的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端口正常访问了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: