phpfreechat主页:http://www.phpfreechat.net/
如果您想在站点上增加个简单的在线聊天功能,这个开源软件很适合。
我自己身边正式环境中倒是没有这类需求,但之前试着装过phpfreechat 1.x,不久前看到有新出的2.x,想看看安装是否还是和1.x一样直接复制到站点下即可。
要特别留意的是需要:
- php >= 5.3.0
- apache server with mod_rewrite and .htaccess enabled
前者大家肯定没有啥问题,因为你找到phpfreechat的话,一般都已经有现成的php环境了。对于后面这一点,如果你是在Windows下用的IIS,什么都不管,直接参考文档下面的快速安装做完后,发现无法正常使用phpfreechat,提示如下信息:
mod_rewrite must be enabled server side and correctly configured. "RewriteBase" could be adjusted in server/.htaccess file.
解决方法:
这里所说的做法是针对IIS 7以上,比如Windows7或2008下面的IIS。
其实IIS 7也是支持Rewrite功能的,具体可以参考这里:
http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module
所以我们只需要在IIS中找到特定的目录,导入phpfreechat的.htaccess文件即可,具体步骤:
IIS左侧浏览到 \phpfreechat-2.1.0\server 文件夹,在中间功能框中找到“URL Rewrite”,双击打开URL Rewrite功能配置界面,在右边Actions清单中找到“Import Rules”,点击打开导入界面,浏览到\phpfreechat-2.1.0\server\.htaccess 文件,导入后确定应用即可。