创星网络[分享知识 传递快乐]

标题: FCKeditor 在Apache+Tomcat整合的环境中使用调试的问题 [打印本页]

作者: luinstein    时间: 2012-12-15 22:34
标题: FCKeditor 在Apache+Tomcat整合的环境中使用调试的问题
发现在通过网址的8080(Tomcat)端口访问,是可以上传和浏览文件的
  而80(Apache)端口访问网站,不能使用,默认会去找php连接,
  发现,干脆改掉访问地址
  经查 ,需要修改FCKConfig.BasePath的默认,再调试发现,位于
  /fckeditor/editor/js/fckeditorcode_ie.js文件第34行
  1. 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);
复制代码
修改为:
  1.   FCKConfig.BasePath=document.location.protocol+'//'+document.location.hostname+':8080'+document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1);
复制代码
这样,就可以通过80端口正常访问了。





欢迎光临 创星网络[分享知识 传递快乐] (http://bbs.cxweb.com.cn/) Powered by Discuz! X3