BN089-BS开发框架MVC4版/source20131023/Zephyr.Net/Zephyr.Utils/Asp/Http/Other.cs
(完整代码) 1KBusing System;
using System.Web;
using System.Text.RegularExpressions;
using System.Web.UI.HtmlControls;
using System.IO;
using System.IO.Compression;
using System.Web.UI.WebControls;
using System.Text;
using System.Collections.Generic;
namespace Zephyr.Utils
{
/// <summary>
/// WEB请求上下文信息工具类
/// </summary>
public partial class ZHttp
{
#region 获取当前站点的Application实例
/// <summary>
/// 获取当前站点的Application实例
/// </summary>
public static System.Web.HttpApplicationState Application
{
get
{
return HttpContext.Current.Application;
}
}
#endregion
#region 取得页面返回的信息
public static string Get_url_data(string url)
{
url = RootFullPath + url.Trim('/');
string Url_Data = "";
try
{
System.Net.WebRequest Request = System.Net.WebRequest.Create(url);
System.Net.WebResponse Response = Request.GetResponse();
System.IO.Stream resStream = Response.GetResponseStream();
System.IO.StreamReader sr = new System.IO.StreamReader(resStream, System.Text.Encoding.Default);
Url_Data = sr.ReadToEnd();
resStream.Close();
sr.Close();
}
catch { }
return Url_Data.Trim();
}
#endregion
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。