- 浏览: 5305 次
- 性别:
- 来自: 北京
最新评论
文章列表
package utils;
import javax.servlet.http.HttpServletRequest;
public class IPUtil {
public static String getRemortIP(HttpServletRequest request) {
if (request.getHeader("x-forwarded-for") == null) {
return request.getRemoteAddr();
}
return request.getHeader("x-for ...
<%ip=request.ServerVariables("REMOTE_ADDR")
response.Write(ip)%>
较准的获取IP:
<%Private Function getIP()
Dim strIPAddr
If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "u ...
java上传文件到微信客户端
- 博客分类:
- java 处理微信
package utils.weixin;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLC ...