--lua代码localhttp=require"socket.http"localltn12=require("ltn12")request_body=‘u=1¶meter={"m":"S"}‘localresult=http.request{url="http://127.0.0.1/2.php",sink=ltn12.sink.file(io.stdout),method="POST",headers={["Content-Type"]="application/x-www-form..
分类:
其他好文 时间:
2014-08-21 19:41:35
阅读次数:
489
在开发工作中,我们常常需要获取客户端的IP。一般获取客户端的IP地址的方法是:request.getRemoteAddr();但是在通过了Apache,Squid等反向代理软件就不能获取到客户端的真实IP地址了。原因:由于在客户端和服务之间增加了中间代理,因此服务器无法直接拿到客户端的IP,服务器端...
分类:
编程语言 时间:
2014-08-21 19:02:54
阅读次数:
195
-1) { session_destroy(); $url = 'login.php';}if ($_GET) { $url .= $_SERVER['REQUEST_URI'];}// post数据转发if ($_POST) { curl_setopt($ch,CURLO...
分类:
其他好文 时间:
2014-08-21 18:44:34
阅读次数:
244
做JDBC请求,首先要了解这个JDBC对象是什么,现在已SQLServer为例来说明...
分类:
数据库 时间:
2014-08-21 17:18:54
阅读次数:
328
request.getRealPath("/") 在window获取的是服务器的根目录,结尾包含分隔符,如E:\apache-tomcat-6.0.29-bak\apache-tomcat-6.0.29\apache-tomcat-6.0.29\webapps\test\在Linux下获取的不含分隔...
分类:
系统相关 时间:
2014-08-21 16:57:44
阅读次数:
300
前台富文本编辑器文本乱码,图片正常显示,解决!前台:contentPxp=encodeURIComponent(contentPxp);
后台:Stringcontent=request.getParameter("contentPxp");
(getParameter的时候,servlet会自动解码一下)
分类:
其他好文 时间:
2014-08-21 15:16:40
阅读次数:
261
http模块提供了两个常用的功能, 创建一个http server和做http请求.创建一个http servervar http = require('http');var server = http.createServer();server.on('request', function(req...
分类:
Web程序 时间:
2014-08-21 14:39:34
阅读次数:
154
ExtJS以及JQuery异步请求Session过期解决方案最近在开发中遇到这样的问题,当Session过期后,通过拦截器判断过期并通过response.sendRedirect(request.getServletContext()+"/login.jsp")重定位到登录界面,但是因为大部分前后台...
分类:
Web程序 时间:
2014-08-21 12:55:14
阅读次数:
187
jsp中pageEncoding、charset=UTF-8"在JSP/Servlet 中主要有以下几个地方可以设置编码,pageEncoding="UTF-8"、contentType="text/html;charset=UTF -8"、request.setCharacterEncoding(...
分类:
Web程序 时间:
2014-08-21 08:24:43
阅读次数:
187
soft / hard Determines the recovery behavior of the NFS client after an NFS request times out. If neither option is ...
分类:
其他好文 时间:
2014-08-21 00:05:53
阅读次数:
275