Out Select Case WeekDay(dt,1) Case 1:Out="Sun" Case 2:Out="Mon" Case 3:Out="Tue" Case 4:Out="Wed" Case 5:Out="Thu" Case 6:Out="Fri" Case 7:Out="Sat" End Select engWeekDayName = Out End Function Function engMonthName(dt) Dim Out Select Case Month(dt) Case 1:Out="Jan" Case 2:Out="Feb" Case 3:Out="Mar" Case 4:Out="Apr" Case 5:Out="May" Case 6:Out="Jun" Case 7:Out="Jul" Case 8:Out="Aug" Case 9:Out="Sep" Case 10:Out="Oct" Case 11:Out="Nov" Case 12:Out="Dec" End Select engMonthName = Out End Function %> 然后在具体的页面中,比如index.asp和news.asp的“最上面”加入以下代码:HTTP Header <!--#include file="../include.asp"--> <% '页面将被设置20分钟后过期 SetExpiresHeader(20) %>
function getHostName () dim hostName as String = "" hostName = Request.ServerVariables("HTTP_HOST") if not isDBNull(Request.ServerVariables("HTTP_X_FORWARDED_HOST")) then if len(trim(Request.ServerVariables("HTTP_X_FORWARDED_HOST"))) > 0 then hostName = Request.ServerVariables("HTTP_X_FORWARDED_HOST") end if end if return hostNmae end function
//对于一个需要记录客户端IP的PHP应用:不要直接引用REMOTE_ADDR,而是要使用HTTP_X_FORWARDED_FOR, function getUserIP (){ //注意这个函数中的¥字符是PHP的美元符号 ¥user_ip = ¥_SERVER["REMOTE_ADDR"]; if (¥_SERVER["HTTP_X_FORWARDED_FOR"]) { ¥user_ip = ¥_SERVER["HTTP_X_FORWARDED_FOR"]; } }