最近百度关键字funcool发现很多网站打开之后和我的网站一模一样,以为是整个网站内容被拖走了,后来发现我更新的内容立刻就在这些李鬼网站上出现了。Ping这些域名后,原来是这些域名直接指向了我主机的IP。为了防止这些李鬼,必须想出一个解决方案。通过度娘得到消息:主机头绑定。

Read More

文章来源 www.kowen.cn

功能介绍

一个通用的struts2下载Action,下载链接传入两个参数:

  • fileName 文件服务器端路径 必须
  • downloadName参数 浏览器接收到的文件名,可省略后缀名,可不写

Read More

文章来源 www.kowen.cn

今天写程序时遇到一个问题,提交代码到远程服务器时遭到了拒绝,报错如下:

1
2
3
4
5
6
7
8
$ git push origin restruct
To ssh://git@kowen.cn:9022/IcCard.git
! [rejected] restruct -> restruct (non-fast-forward)
error: failed to push some refs to 'ssh://git@kowen.cn:9022/IcCard.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

后来分析了一下,原因是我刚刚push了restruct分支到服务器,但是我代码有个地方忘了改了,改完之后使用的 git commit –amend 命令在本地提交了修改,造成了本地的最新版本和远端最新版本的不一致。 于是按照提示先运行了 git pull origin restruct , 然后再次push成功.