我爱Aspx >> Asp.Net >> 用浏览器来接收C# 的程序返回的时间cool!} catch(FileNotFoundException) {
writeFailure();
sw.WriteLine("File not found: " + url);
}
sw.Flush();
}
public void writeSuccess() {
sw.WriteLine("HTTP/1.1 200 OK");
sw.WriteLine("Server: Microsoft-IIS/5.0");
sw.WriteLine("Date: Mon, 27 Nov 2000 08:19:43 GMT");
sw.WriteLine("Content-Length: 6");
sw.WriteLine("Content-Type: text/html");
sw.WriteLine("");
String strDateLine;
DateTime now;
now = DateTime.Now;
strDateLine = now.ToShortDateString() + " " + now.ToLongTimeString();
sw.WriteLine(strDateLine);
}
public void writeFailure() {
sw.WriteLine("HTTP/1.0 404 File not found");
sw.WriteLine("Connection: close");
sw.WriteLine();
}
}
public class HttpServer {
public HttpServer() : this(81) {
}
public HttpServer(int port) {
Ҷƪл˵?
使用C# 编写扩展存储过程[05-20]
C#正则表达式应用范例[05-20]
C#编程发送邮件[05-20]
c# 支持SMTP服务器认证的邮件发送..[05-20]
C# 格式化字符串 String.Format[05-20]
C# 格式化字符串 String.Format[05-20]
C#实现控件数组[05-20]
用C#读取图片的EXIF信息的方法[05-20]
用Visual C#实现文件下载[05-20]
使用C#调用外部Ping命令获取网络..[05-20]
使用C# 编写扩展存储过程[05-20]
C#正则表达式应用范例[05-20]
ASP生成静态网页的方法[05-20]
用ASP动态生成JavaScript的表单验..[05-20]
使用ASP实现http://xx@xx.xx虚拟..[05-20]
用ASP编程控制在IIS建立Web站点[05-20]
TrackBack 技术规范[05-20]
C#编程发送邮件[05-20]
c# 支持SMTP服务器认证的邮件发送..[05-20]
加固Windows Server 2003 IIS 服..[05-20]