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

本文介绍了解决FCKeditor在80端口下无法正常访问的问题,通过修改FCKConfig.BasePath配置,使得在Apache服务器环境下也能正常使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

发现在通过网址的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端口正常访问了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值