jspÉú³Éhtml¾²Ì¬Ò³Ãæ´úÂë
<%@ page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*" %>
<%
//ÔÚÕâÀïÈç¹ûд³É“WEB-INF\templates\template.htm”³ÌÐò»á±¨´í
String filePath = request.getRealPath("/")+"WEB-INF/templates/template.htm";
out.print(filePath);
String templateContent="";
FileInputStream fileinputstream = new FileInputStream(filePath);//¶ÁÈ¡Ä£¿éÎļþ
//int lenght = fileinputstream.available();
byte bytes[] = new byte[1024];
fileinputstream.read(bytes);
fileinputstream.close();
templateContent = new String(bytes);
out.print("ÒÔÏÂÊÇÄ£°åÄÚÈÝ£º<br>"+templateContent+"<br> ÒÔÏÂÊÇÖû»ÒÔºóµÄhtmlÄÚÈÝ<br><hr>");
templateContent=templateContent.replaceAll("#title#","ÎÄÕ±êÌâ");
templateContent=templateContent.replaceAll("#author#","×÷ÕßÊÇË");//Ìæ»»µôÄ£¿éÖÐÏàÓ¦µÄµØ·½
templateContent=templateContent.replaceAll("#content#","ÎÄÕÂÄÚÈÝ");
// ¸ù¾Ýʱ¼äµÃÎļþÃû
Calendar calendar = Calendar.getInstance();
String fileame = String.valueOf(calendar.getTimeInMillis()) +".html";
fileame = request.getRealPath("/")+fileame;//Éú³ÉµÄhtmlÎļþ±£´æ·¾¶
out.print(templateContent);
FileOutputStream fileoutputstream = new FileOutputStream(fileame);//½¨Á¢ÎļþÊä³öÁ÷
byte tag_bytes[] = templateContent.getBytes();
fileoutputstream.write(tag_bytes);
fileoutputstream.close();
%>
Ïà¹ØÎĵµ£º
Ä¿Ç°£¬×î³£ÓõÄÈýÖÖ¶¯Ì¬ÍøÒ³ÓïÑÔÓÐASP(Active Server Pages),JSP(Java Server Pages),
PHP (Hypertext Preprocessor)¡£
¼ò ½é
¡¡¡¡ASPÈ«ÃûActive Server & ......
JSP µÄÄÚÖöÔÏóÓУºresquest ¡¢response¡¢session¡¢ application ¡¢out¡£ÒÔÏÂÎÒÃǽ«
Ò»Ò»½éÉÜ¡£
response ºÍrequest ¶ÔÏóÊÇJSP µÄÄÚÖöÔÏó½ÏÖØÒªµÄÁ½¸ö£¬ÕâÁ½¸ö¶ÔÏóÌṩÁ˶ԷþÎñ
Æ÷ºÍä¯ÀÀÆ÷ͨÐÅ·½·¨µÄ¿ØÖÆ¡£Ö±½ÓÌÖÂÛÕâÁ½¸ö¶ÔÏóÇ°£¬ÒªÏȶÔHTTP ÐÒé----Word Wide
Webµ×²ãÐÒé×÷¼òµ¥½éÉÜ¡£
Word Wide WebÊÇÔõÑùÔËÐеÄÄØ£ ......
Õâ¸ö“ä¯ÀÀÆ÷ĬÈÏHTMLµÄCSSÑùʽÊôÐÔ”£¬ÔÚÄãÐèÒª»¹ÔĬÈÏÖµµÄʱºò£¬±È½ÏÓÐÓ᣿ªÊ¼µÄʱºòÓ¦ÓÃͨÅäÑ¡ÔñÆ÷ *
{margin:0;padding:0;}£¬µ±ÐèҪʹÓñ߾àµÄʱºò£¬¾ÍÐèÒª»¹ÔHTMLĬÈÏCSSÖµÁË¡£
µ«Í¨ÅäÑ¡ÔñÆ÷ÔÚ´óÐÍÍøÕ¾µÄ¹¹½¨ÖУ¬Ó°
ÏìÐÔÄÜ£¬¿ÉÒԲο¼52CSS.comµÄÏà¹ØÎÄÕ£¬´ó¼Ò»¹ÊÇÐèÒª½÷É÷һЩ¡£
¡¡¡¡Ò ......
string str = a.ToString();
str = Regex.Replace(str, @"</?span[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"&#[^>]*;", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, @"</?marquee[^>]*>", "", RegexOptions.IgnoreCase);
str = Regex.Replace(str, ......