{"id":383,"date":"2005-10-31T06:13:09","date_gmt":"2005-10-30T18:13:09","guid":{"rendered":""},"modified":"2005-10-31T06:13:09","modified_gmt":"2005-10-30T18:13:09","slug":"","status":"publish","type":"post","link":"https:\/\/www.mudone.com\/?p=383","title":{"rendered":"ASP\u751f\u6210\u9759\u6001\u9875\u9762\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u6211\u5e0c\u671b\u5927\u5bb6\u770b\u5230\u8be5\u6807\u9898\u5c31\u80fd\u8ba9\u60f3\u8c61\u5230\u5b83\u7684\u529f\u80fd\uff1a<\/p>\n<p>1\uff0c WITH TEMPLET\u610f\u601d\u662f\uff0c\u751f\u6210\u7684\u9875\u9762\u67b6\u6784\u5c06\u91c7\u7528\u67d0\u4e2a\u5df2\u8bbe\u5b9a\u7684\u6a21\u677f\uff0c\u5728\u6b64\u4e4b\u524d\u6211\u7684\u4e00\u7bc7\u6559\u7a0b\u4e2d\u4ecb\u7ecd\u8fc7\uff0c\u5e0c\u671b\u5404\u4f4d\u5728\u770b\u672c\u6559\u7a0b\u4e4b\u524d\u5bf9ASP\u91c7\u7528\u6a21\u677f\u5e94\u719f\u6089\u4e0b\u3002\uff08\u5f53\u7136\uff0c\u4e0d\u770b\u4e5f\u6ca1\u6709\u95ee\u9898\uff0c\u672c\u6559\u7a0b\u540c\u6837\u4f1a\u63d0\u53ca\u7cbe\u534e\u90e8\u5206\u7684\uff1a\uff09\u5177\u4f53\u53c2\u8003\uff1a<a href=\"http:\/\/www.cnbruce.com\/blog\/showlog.asp?\" title=\"http:\/\/www.cnbruce.com\/blog\/showlog.asp?\" target=\"_blank\">http:\/\/www.cnbruce.com\/blog\/showlog.asp?<\/a> cat_id=26&amp;log_id=474<\/p>\n<p>2\uff0cASP2HTML\u3002\u4e0d\u8981\u6211\u518d\u8bf4ASP\u8f6c\u53d8\u6210HTML\u7684\u597d\u5904\u4e86\u5427\uff0c\u5475\u5475\uff0c\u5176\u4e2d\u6700\u503c\u5f97\u77e5\u9053\u7684\u5c31\u662f\uff1a\u9759\u6001HTML\u9875\u548c\u52a8\u6001\u9875\u5bf9\u670d\u52a1\u5668\u7684\u8981\u6c42\u627f\u53d7\u80fd\u529b\u5c0f\u5f97\u591a\uff0c\u540c\u6837\uff0c\u9759\u6001HTML\u641c\u7d22\u51e0\u7387\u8fdc\u6bd4\u52a8\u6001\u9875\u9762\u7684\u591a\u5f97\u591a\u3002<\/p>\n<p>\u90a3\u4e48\uff0c\u6211\u73b0\u5728\u9700\u8981\u5904\u7406\u7684\u6280\u672f\u95ee\u9898\u5c31\u662f\uff1a<br \/>\n1\uff0c\u5982\u4f55\u5b9e\u73b0\u6a21\u677f\u6280\u672f\uff1f\uff08\u5148\u53c2\u770b\u4e0b\u4e0a\u7bc7\u6587\u7ae0\u5427\uff09<br \/>\n2\uff0c\u5982\u4f55\u5b9e\u73b02HTML\u6280\u672f\uff1f<br \/>\n3\uff0c\u5982\u4f55\u8ba9\u6a21\u677f\u6280\u672f\u4e0e2HTML\u6280\u672f\u7ed3\u5408\uff1f<\/p>\n<p>\u4e00\u3001\u5148\u8fdb\u884c\u6280\u672f\u539f\u7406\u5206\u6790<\/p>\n<p><!--more-->1\uff0c\u6a21\u677f\u6280\u672f\u53c2\u770b www.cnbruce.com\/blog\/showlog.asp?cat_id=26&amp;log_id=474<\/p>\n<p>2\uff0c2HTML\u6280\u672f\u53c8\u8be5\u5982\u4f55\u5b9e\u73b0\u5462\uff1f\u5982\u4f55\u4f7f\u5f97ASP\u9875\u9762\u8f6c\u53d8\u4e3aHTML\uff1f\u4e00\u822c\u90fd\u4f1a\u60f3\u5230FSO\u7ec4\u4ef6\uff0c\u56e0\u4e3a\u8be5\u7ec4\u4ef6\u80fd\u65b0\u5efa\u4efb\u4f55\u6587\u4ef6\u683c\u5f0f\u3002<\/p>\n<p>\u90a3\u4e48\u5176\u6574\u4e2a\u8fd0\u884c\u8fc7\u7a0b\u662f\u600e\u4e48\u6837\u7684\u5462\uff1f<br \/>\na\uff0c\u63d0\u4f9b\u4fe1\u606f\u8f93\u5165\u9875\u9762\u8fdb\u884c\u4fe1\u606f\u6536\u96c6\uff1b<br \/>\nb\uff0c\u63a5\u53d7\u4fe1\u606f\u503c\u5148\u4fdd\u5b58\u6570\u636e\u5e93\uff0c\u518dFSO\u751f\u6210\u6587\u4ef6\uff1b<br \/>\nc\uff0c\u6280\u672f\u6027\u5b8c\u6210\u4efb\u52a1\uff0c\u663e\u793a\u521a\u88ab\u521b\u5efa\u7684HTML\u6587\u4ef6\u7684\u8def\u5f84\u5730\u5740\u3002<\/p>\n<p>\u8be5\u6280\u672f\u7684\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\u6709\u5982\u4e0b\u51e0\u4e2a\u96be\u70b9\uff1a<\/p>\n<p>i\uff0cFSO\u751f\u6210\u7684\u6587\u4ef6\u662f\u76f4\u63a5\u653e\u5728\u4e00\u4e2a\u5927\u6587\u4ef6\u5939\u4e0b\uff0c\u8fd8\u662f\u5355\u72ec\u653e\u5728\u67d0\u4e2a\u6bcf\u65e5\u66f4\u65b0\u7684\u5b50\u6587\u4ef6\u5939\u4e2d\uff1f\u53ef\u80fd\u8868\u8ff0\u4e0d\u51c6\u786e\uff0c\u8fd9\u6837\u7406\u89e3\u5427\uff1a\u76f8\u4fe1\u901a\u8fc7FSO\u751f\u6210\u7684\u6587\u4ef6\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\uff0c\u6587\u4ef6\u4f1a\u8d8a\u6765\u8d8a\u591a\uff0c\u7ba1\u7406\u4e5f\u4f1a\u8d8a\u6765\u8d8a\u4e71\u2026\u2026\u901a\u5e38\u4f60\u53ef\u80fd\u770b\u5230\u4e00\u4e9b\u5730\u5740\u8bf8\u5982 www.xxx.com\/a\/2004-5-20\/200405201111.html \u53ef\u4ee5\u5206\u6790\u5f97\u51fa\u5e94\u8be5\u662f\u5efa\u7acb\u4e86\u5f53\u524d\u65e5\u671f\u7684\u6587\u4ef6\u5939\u3002\u8fd9\u6837\uff0c\u4e00\u5929\u5c31\u662f\u4e00\u4e2a\u6587\u4ef6\u5939\u7684\u9875\u9762\u5185\u5bb9\uff0c\u67e5\u770b\u7ba1\u7406\u4e5f\u5c31\u663e\u5f97\u6bd4\u8f83\u5408\u7406\u3002<\/p>\n<p>ii\uff0c\u6211\u5728\u8bd5\u56fe\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u5efa\u7acb\u6587\u4ef6\u5939\u7684\u65f6\u5019\uff0c\u53c8\u53d1\u73b0\u4e86\u7b2c\u4e8c\u4e2a\u95ee\u9898\u3002\u7b2c\u4e00\u6b21\u901a\u8fc7FSO\u5efa\u7acb\u4ee5\u5f53\u524d\u65e5\u671f\u547d\u540d\u7684\u6587\u4ef6\u5939\uff0c\u6ca1\u6709\u95ee\u9898\u3002\u5f53\u6211\u6709\u65b0\u7684\u6587\u4ef6\u9700\u8981\u751f\u6210\u65f6\uff0c\u56e0\u4e3a\u662f\u540c\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u6240\u4ee5\uff0c\u5176\u53c8\u5c06\u4f1a\u6267\u884c\u5efa\u7acb\u540c\u6837\u7684\u6587\u4ef6\u5939\u3002\u6b64\u65f6\uff0cFSO\u7ec4\u4ef6\u4f1a\u53d1\u73b0\u8be5\u8def\u5f84\u5df2\u5b58\u5728\u2026\u2026\u5361\u58f3-_-! \u7ee7\u7eed\u5904\u7406\uff0c\u5728\u9996\u884c\u6dfb\u52a0\u4ee3\u7801\uff1a<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">On Error Resume Next<\/div>\n<\/div>\n<p>\u563f\u563f\uff0c\u8fbe\u5230\u81ea\u6b3a\u6b3a\u4eba\u3001\u63a9\u8033\u76d7\u94c3\u7684\u6548\u679c\u3002<\/p>\n<p>\u5f53\u7136\u89c4\u77e9\u7684\u7528\u6cd5\u662f\u5224\u65ad\u6587\u4ef6\u5939\u7684\u6709\u65e0<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%<br \/>\nSet fso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)<br \/>\nif (fso.FolderExists(Server.MapPath(folder))) then<br \/>\n&#39;\u5224\u65ad\u5982\u679c\u5b58\u5728\u5c31\u4e0d\u505a\u5904\u7406<br \/>\nelse<br \/>\n&#39;\u5224\u65ad\u5982\u679c\u4e0d\u5b58\u5728\u5219\u5efa\u7acb\u65b0\u6587\u4ef6\u5939<br \/>\nfso.CreateFolder(Server.MapPath(folder))<br \/>\nend if<br \/>\n%&gt;<\/div>\n<\/div>\n<p>iii\uff0c\u6587\u4ef6\u5939\u662f\u5efa\u7acb\u4e86\uff0c\u6587\u4ef6\u8be5\u5982\u4f55\u5efa\u7acb\u5462\uff1f\u4e3b\u8981\u4e5f\u5c31\u662f\u6587\u4ef6\u540d\u7684\u751f\u6210\u3002\u5f53\u7136\u8fd9\u4e2a\u5c31\u9700\u8981\u81ea\u5df1\u6765\u5199\u4e2a\u51fd\u6570\uff0c\u529f\u80fd\u5c31\u662f\u5982\u4f55\u751f\u6210\u6587\u4ef6\u540d\uff1a\uff09<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%<br \/>\nfunction makefilename(fname)<br \/>\nfname = fname &#39;\u524dfname\u4e3a\u53d8\u91cf\uff0c\u540efname\u4e3a\u51fd\u6570\u53c2\u6570\u5f15\u7528<br \/>\nfname = replace(fname,&quot;-&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot; &quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;:&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;PM&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;AM&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;\u4e0a\u5348&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;\u4e0b\u5348&quot;,&quot;&quot;)<br \/>\nmakefilename = fname &amp; &quot;.html&quot;<br \/>\nend function<br \/>\n%&gt;<\/div>\n<\/div>\n<p>\u5f15\u7528\u51fd\u6570\u5219\uff1a<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%fname = makefilename(now())%&gt;<\/div>\n<\/div>\n<p>\u5176\u5b9e\u561b\uff0c\u5c31\u662f\u4ee5\u5e74\u6708\u65e5\u65f6\u5206\u79d2\u547d\u540d\u7684\u6587\u4ef6\u3002<\/p>\n<p>iv\uff0c\u6700\u540e\uff0c\u751f\u6210\u7684\u6587\u4ef6\u8be5\u5982\u4f55\u67e5\u770b\u5230\uff1f\u5f53\u7136\u9700\u8981\u628a\u751f\u6210\u6587\u4ef6\u7684\u8def\u5f84\u4fdd\u5b58\u7684\u6570\u636e\u5e93\u4e2d\uff0c\u5e76\u4e14\u6dfb\u52a0\u5230\u76f8\u5bf9\u5e94\u7684\u8bb0\u5f55\u96c6\u4e2d\u4e86\u3002\u5f53\u7136\uff0c\u8fd9\u5728\u4e0b\u9762\u7684\u6570\u636e\u5e93\u8bbe\u8ba1\u65f6\u4f1a\u63d0\u53ca\u5230\u3002<\/p>\n<p>3\uff0c\u6a21\u677f\u6280\u672f\u548c2HTML\u6280\u672f\u7684\u7ed3\u5408\uff1a\u5c06\u6a21\u677f\u4e2d\u7279\u6b8a\u4ee3\u7801\u7684\u503c\u66ff\u6362\u4e3a\u4ece\u8868\u5355\u63a5\u53d7\u8fc7\u6765\u7684\u503c\uff0c\u5b8c\u6210\u6a21\u677f\u529f\u80fd\uff1b\u5c06\u6700\u7ec8\u66ff\u6362\u8fc7\u7684\u6240\u6709\u6a21\u677f\u4ee3\u7801\u751f\u6210HTML\u6587\u4ef6\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u66ff\u6362\u5e94\u80fd\u5c06\u8f93\u5165\u6570\u636e\u7684\u683c\u5f0f\u6216\u8005\u652f\u6301UBB\u7684\u4ee3\u7801\u5f7b\u5e95\u6539\u53d8\u3002<\/p>\n<p>\u4e8c\uff0c\u518d\u8fdb\u884c\u6570\u636e\u5e93\u8bbe\u8ba1<\/p>\n<p>\u76ee\u524d\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u9700\u8981\u4e24\u4e2a\u8868\uff1a\u4e00\u4e2a\u662f\u5b58\u653e\u6a21\u677f\u6570\u636e\u7684\uff1b\u4e00\u4e2a\u662f\u5b58\u653e\u4fe1\u606f\u5185\u5bb9\u7684\u3002<\/p>\n<p>1\uff0c\u5efa\u7acb\u65b0\u6570\u636e\u5e93asp2html.mdb<\/p>\n<p>2\uff0c\u8bbe\u8ba1\u65b0\u6570\u636e\u5e93\u8868c_moban<br \/>\n\u5b57\u6bb5m_id\uff08\u81ea\u52a8\u7f16\u53f7\uff0c\u4e3b\u5173\u952e\u5b57\uff09\uff1b\u5b57\u6bb5m_html\uff08\u5907\u6ce8\u7c7b\u578b\uff09\u3002<br \/>\n\u5e76\u5c06\u4e0b\u5217\u5b8c\u6574\u7684\u4ee3\u7801\u62f7\u8d1d\u81f3m_html\u5b57\u6bb5<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=hz&quot;&gt;<br \/>\n&lt;title&gt;Cnbruce.Com | ASP2HTML TEST&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body leftmargin=&quot;0&quot; topmargin=&quot;0&quot;&gt;<br \/>\n&lt;table width=&quot;100%&quot; height=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;5&quot; cellspacing=&quot;2&quot;&gt;<br \/>\n&lt;tr align=&quot;right&quot; bgcolor=&quot;#CCCCCC&quot;&gt;<br \/>\n&lt;td height=&quot;20&quot; colspan=&quot;2&quot;&gt;$cntop{LogContent}lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;tr valign=&quot;top&quot;&gt;<br \/>\n&lt;td width=&quot;25%&quot; bgcolor=&quot;#e5e5e5&quot;&gt;$cnleft{LogContent}lt;\/td&gt;<br \/>\n&lt;td width=&quot;74%&quot; bgcolor=&quot;#f3f3f3&quot;&gt;$cnright{LogContent}lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;\/table&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/div>\n<\/div>\n<p>3\uff0c\u8bbe\u8ba1\u65b0\u6570\u636e\u5e93\u8868c_news<\/p>\n<p>\u5b57\u6bb5c_id\uff1a\u81ea\u52a8\u7f16\u53f7\uff0c\u4e3b\u5173\u952e\u5b57<br \/>\n\u5b57\u6bb5c_title\uff1a\u6587\u672c\u7c7b\u578b\uff0c\u4fdd\u5b58\u6587\u7ae0\u6807\u9898<br \/>\n\u5b57\u6bb5c_content\uff1a\u5907\u6ce8\u7c7b\u578b\uff0c\u4fdd\u5b58\u6587\u7ae0\u5185\u5bb9<br \/>\n\u5b57\u6bb5c_filepath\uff1a\u6587\u672c\u7c7b\u578b\uff0c\u4fdd\u6301\u751f\u6210\u6587\u4ef6\u7684\u8def\u5f84\u5730\u5740<br \/>\n\u5b57\u6bb5c_time\uff1a\u65e5\u671f\/\u65f6\u95f4\u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c\uff1aNow()<\/p>\n<p>\u4e09\uff0c\u9875\u9762\u9700\u6c42\u8bbe\u8ba1<\/p>\n<p>1\uff0c\u9996\u5148\u5efa\u7acb\u4e00\u4e2a\u5b58\u653eHTML\u9875\u7684\u6587\u4ef6\u5939<\/p>\n<p>\u5728\u6587\u4ef6\u540c\u4e00\u76ee\u5f55\u4e0b\uff0c\u5efa\u7acb\u6587\u4ef6\u5939newsfile\uff0c\u5939\u5b50\u5185\u90e8\u4e3b\u8981\u5b58\u653e\u751f\u6210\u7684HTML\u9875\u9762\uff0c\u5f53\u7136\u5185\u90e8\u8fd8\u4f1a\u91c7\u7528\u7a0b\u5e8f\u65b9\u5f0f\u5efa\u7acb\u4ee5\u65e5\u671f\u547d\u540d\u7684\u5b50\u6587\u4ef6\u5939\uff0c\u4ee5\u65b9\u4fbf\u6d4f\u89c8\u4ee5\u53ca\u7ba1\u7406\u3002<\/p>\n<p>2\uff0c\u529f\u80fd\u51fd\u6570\u9875\u9762lib.asp<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%<br \/>\n&#39;\u751f\u6210\u6587\u4ef6\u540d\u7684\u51fd\u6570<br \/>\nfunction makefilename(fname)<br \/>\nfname = fname<br \/>\nfname = replace(fname,&quot;-&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot; &quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;:&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;PM&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;AM&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;\u4e0a\u5348&quot;,&quot;&quot;)<br \/>\nfname = replace(fname,&quot;\u4e0b\u5348&quot;,&quot;&quot;)<br \/>\nmakefilename=fname &amp; &quot;.shtml&quot;<br \/>\nend function<\/p>\n<p>&#39;\u4fdd\u6301\u6570\u636e\u683c\u5f0f\u4e0d\u53d8\u7684\u51fd\u6570<br \/>\nfunction HTMLEncode(fString)<br \/>\nfString = replace(fString, &quot;&gt;&quot;, &quot;&amp;gt;&quot;)<br \/>\nfString = replace(fString, &quot;&lt;&quot;, &quot;&amp;lt;&quot;)<br \/>\nfString = Replace(fString, CHR(32), &quot;&amp;nbsp;&quot;)<br \/>\nfString = Replace(fString, CHR(13), &quot;&quot;)<br \/>\nfString = Replace(fString, CHR(10) &amp; CHR(10), &quot;&lt;br&gt;&quot;)<br \/>\nfString = Replace(fString, CHR(10), &quot;&lt;br&gt;&quot;)<br \/>\nHTMLEncode = fString<br \/>\nend function<br \/>\n%&gt;<\/p><\/div>\n<\/div>\n<p>3\uff0c\u6570\u636e\u5e93\u8fde\u63a5\u9875\u9762conn.asp<br \/>\n\u5b8c\u6210\u6570\u636e\u5e93\u7684\u5b57\u7b26\u4e32\u8fde\u63a5\u65b9\u6cd5<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%<br \/>\nset conn = Server.CreateObject(&quot;ADODB.Connection&quot;)<br \/>\nconnstr = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;&amp;Server.MapPath(&quot;asp2html.mdb&quot;)<br \/>\nconn.Open connstr<br \/>\n%&gt;<\/div>\n<\/div>\n<p>4\uff0c\u4fe1\u606f\u8f93\u5165\u9875\u9762add.html<br \/>\n\u5176\u5b9e\u5f88\u7b80\u5355\uff1a\uff09\u5c31\u662f\u8868\u5355\u561b\u3002\u6ce8\u610faction\u662f\u8df3\u8f6c\u5230addit.asp<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;form action=&quot;addit.asp&quot; method=&quot;post&quot;&gt;<br \/>\nTitle:&lt;input type=&quot;text&quot; name=&quot;c_title&quot;&gt;&lt;br&gt;<br \/>\nContent:&lt;br&gt;<br \/>\n&lt;textarea name=&quot;c_content&quot; rows=&quot;8&quot; cols=&quot;30&quot;&gt;&lt;\/textarea&gt;&lt;br&gt;<br \/>\n&lt;input type=&quot;submit&quot; value=&quot;Add&quot;&gt;<br \/>\n&lt;input type=&quot;reset&quot; value=&quot;Reset&quot;&gt;<br \/>\n&lt;\/form&gt;<\/div>\n<\/div>\n<p>5\uff0c\u5904\u7406\u6570\u636e\u529f\u80fd\u663e\u793a\u9875\u9762addit.asp<br \/>\n\u9996\u5148\u662f\u5904\u7406\u63a5\u53d7\u8fc7\u6765\u7684\u6570\u636e\uff0c\u5e76\u5c06\u503c\u5199\u5165\u6570\u636e\u5e93\uff1b\u63a5\u7740\u5c06\u6a21\u677f\u4ee3\u7801\u8fdb\u884c\u5f15\u7528\uff0c\u5e76\u5c06\u5176\u4e2d\u7279\u6b8a\u4ee3\u7801\u8f6c\u6362\u4e3a\u63a5\u53d7\u503c\uff0c\u6700\u7ec8\u901a\u8fc7FSO\u751f\u6210HTML\u9875\u9762\u3002\u5176\u4e2d\u9700\u8981\u6ce8\u610f\u7684\u8fd8\u6709\uff0c\u751f\u6210\u6587\u4ef6\u7684\u8def\u5f84\u5730\u5740\u4fdd\u5b58\u81f3\u6570\u636e\u5e93\u8868\u3002<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;%&#39;\u5bb9\u9519\u5904\u7406<br \/>\nOn Error Resume Next<br \/>\n%&gt;<\/p>\n<p>&lt;!&#8211;#include file=&quot;conn.asp&quot; &#8211;&gt;<br \/>\n&lt;!&#8211;#include file=&quot;lib.asp&quot; &#8211;&gt;<\/p>\n<p>&lt;%&#39;\u63a5\u53d7\u4f20\u9012\u503c<br \/>\nc_title=request.form(&quot;c_title&quot;)<br \/>\nc_content=request.form(&quot;c_content&quot;)<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u751f\u6210HTML\u6587\u4ef6\u540d\uff0c\u5efa\u7acb\u6587\u4ef6\u5939\uff0c\u6307\u5b9a\u6587\u4ef6\u8def\u5f84<br \/>\nfname = makefilename(now()) &#39;makefilename\u4e3a\u81ea\u5b9a\u4e49\u51fd\u6570<br \/>\nfolder = &quot;newsfile\/&quot;&amp;date()&amp;&quot;\/&quot;<br \/>\nfilepath = folder&amp;fname<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u5c06\u63a5\u53d7\u503c\u53ca\u8def\u5f84\u4fdd\u6301\u81f3\u6570\u636e\u5e93\u8868<br \/>\nsql = &quot;Select * from c_news&quot;<br \/>\nSet rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br \/>\nrs.Open sql,conn,3,2<br \/>\nrs.addnew<br \/>\nrs(&quot;c_title&quot;)=c_title<br \/>\nrs(&quot;c_content&quot;)=c_content<br \/>\nrs(&quot;c_filepath&quot;)=filepath<br \/>\nrs.update<br \/>\nrs.close<br \/>\nSet rs = Nothing<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u6253\u5f00\u6a21\u677f\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u4e2d\u7279\u6b8a\u4ee3\u7801\u8f6c\u53d8\u4e3a\u63a5\u53d7\u503c<br \/>\nsql1=&quot;select m_id,m_html from c_moban where m_id=1&quot;<br \/>\nset rs1=Server.CreateObject(&quot;adodb.recordset&quot;)<br \/>\nrs1.open sql1,conn,1,1<br \/>\nmb_code=rs1(&quot;m_html&quot;)<br \/>\nrs1.close<br \/>\nset rs1=nothing<br \/>\nconn.close<br \/>\nset conn=nothing<br \/>\nc_title=htmlencode(c_title)<br \/>\nc_content=htmlencode(c_content)<br \/>\nmb_code=replace(mb_code,&quot;$cntop{LogContent}quot;,now())<br \/>\nmb_code=replace(mb_code,&quot;$cnleft{LogContent}quot;,c_title)<br \/>\nmb_code=replace(mb_code,&quot;$cnright{LogContent}quot;,c_content)<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u751f\u6210HTML\u9875\u9762<br \/>\nSet fso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)<br \/>\nfso.CreateFolder(Server.MapPath(folder))<br \/>\nSet fout = fso.CreateTextFile(Server.MapPath(filepath))<br \/>\nfout.WriteLine mb_code<br \/>\nfout.close<br \/>\n%&gt;<\/p><\/div>\n<\/div>\n<p>\u6587\u7ae0\u6dfb\u52a0\u6210\u529f\uff0c&lt;a href=&quot;showit.asp&quot;&gt;\u6d4f\u89c8&lt;\/a&gt;<\/p>\n<p>6\uff0c\u663e\u793a\u6570\u636e\u5e93\u8868\u8bb0\u5f55\uff0c\u5e76\u505a\u6307\u5411HTML\u9875\u7684\u94fe\u63a5\uff1ashowit.asp<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;!&#8211;#include file=&quot;conn.asp&quot; &#8211;&gt;<br \/>\n&lt;!&#8211;#include file=&quot;lib.asp&quot; &#8211;&gt;<br \/>\n&lt;%<br \/>\nSet rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br \/>\nsql = &quot;Select * from c_news order by c_id desc&quot;<br \/>\nrs.Open sql,conn,1,1<br \/>\n%&gt;<\/p>\n<p>&lt;%<br \/>\nif rs.EOF and rs.BOF then<br \/>\nresponse.write (&quot;\u6682\u65f6\u8fd8\u6ca1\u6709\u6587\u7ae0\uff0c&lt;a href=add.html&gt;\u6dfb\u52a0&lt;\/a&gt;&quot;)<br \/>\nelse<br \/>\nDo Until rs.EOF<br \/>\n%&gt;<br \/>\n&lt;table width=&quot;758&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot;&gt;<br \/>\n&lt;tr&gt;<br \/>\n&lt;td width=&quot;159&quot; align=&quot;right&quot; bordercolor=&quot;#CCCCCC&quot; bgcolor=&quot;#CCCCCC&quot;&gt;&lt;%=rs(&quot;c_time&quot;)%&gt;&lt;\/td&gt;<br \/>\n&lt;td width=&quot;591&quot; bordercolor=&quot;#f3f3f3&quot; bgcolor=&quot;#f3f3f3&quot;&gt;&lt;a href=&lt;%=rs(&quot;c_filepath&quot;)%&gt; target=&quot;a_blank&quot;&gt;&lt;%=rs(&quot;c_title&quot;)%&gt;&lt;\/a&gt;&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;tr&gt;<br \/>\n&lt;td valign=&quot;top&quot; align=&quot;right&quot; bordercolor=&quot;#ececec&quot; bgcolor=&quot;#ececec&quot;&gt;[&lt;a href=del.asp?c_id=&lt;%=rs(&quot;c_id&quot;)%&gt;&gt;Dell&lt;\/a&gt;][&lt;a href=change.asp?c_id=&lt;%=rs(&quot;c_id&quot;)%&gt;&gt;Edit&lt;\/a&gt;][&lt;a href=&quot;add.html&quot;&gt;Add&lt;\/a&gt;]&lt;\/td&gt;<br \/>\n&lt;td valign=&quot;top&quot; bordercolor=&quot;#FFFFFF&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&lt;%=htmlencode(rs(&quot;c_content&quot;))%&gt;&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;\/table&gt;&lt;br&gt;<br \/>\n&lt;%<br \/>\nrs.MoveNext<br \/>\nLoop<br \/>\nend if<br \/>\n%&gt;<\/p>\n<p>&lt;%<br \/>\nrs.close<br \/>\nSet rs = Nothing<br \/>\nconn.close<br \/>\nset conn=Nothing<br \/>\n%&gt;<\/p><\/div>\n<\/div>\n<p>7\uff0c\u4fee\u6539\u6570\u636e\u5185\u5bb9\u9875change.asp<\/p>\n<p>\u4fee\u6539\u6570\u636e\u5185\u5bb9\uff0c\u540c\u65f6\u4e5f\u9700\u8981\u4fee\u6539\u66f4\u65b0\u5bf9\u5e94\u7684HTML\u9875\u9762\u3002\u4fee\u6539\u5176\u5b9e\u5c31\u662f\u91cd\u65b0\u751f\u6210\u6587\u4ef6\uff0c\u4e14\u6587\u4ef6\u540d\u548c\u4e4b\u524d\u4e00\u6837\uff0c\u7c7b\u4f3c\u6587\u4ef6\u7684\u8986\u76d6\u3002<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;!&#8211;#include file=&quot;conn.asp&quot; &#8211;&gt;<br \/>\n&lt;!&#8211;#include file=&quot;lib.asp&quot; &#8211;&gt;<\/p>\n<p>&lt;%id=request.querystring(&quot;c_id&quot;)%&gt;<\/p>\n<p>&lt;%<br \/>\nif request.form(&quot;submit&quot;)=&quot;change&quot; then<br \/>\nc_title=request.form(&quot;c_title&quot;)<br \/>\nc_content=request.form(&quot;c_content&quot;)<br \/>\nc_id=request.form(&quot;c_id&quot;)<br \/>\nc_filepath=request.form(&quot;c_filepath&quot;)<\/p>\n<p>Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br \/>\nsql = &quot;Select * from c_news where c_id=&quot;&amp;c_id<br \/>\nrs.Open sql,conn,3,2<br \/>\nrs(&quot;c_title&quot;)=c_title<br \/>\nrs(&quot;c_content&quot;)=c_content<br \/>\nrs(&quot;c_time&quot;)=now()<br \/>\nrs.update<br \/>\nrs.close<br \/>\nSet rs = Nothing<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u6253\u5f00\u6a21\u677f\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u4e2d\u7279\u6b8a\u4ee3\u7801\u8f6c\u53d8\u4e3a\u63a5\u53d7\u503c<br \/>\nsql1=&quot;select m_id,m_html from c_moban where m_id=1&quot;<br \/>\nset rs1=Server.CreateObject(&quot;adodb.recordset&quot;)<br \/>\nrs1.open sql1,conn,1,1<br \/>\nmb_code=rs1(&quot;m_html&quot;)<br \/>\nrs1.close<br \/>\nset rs1=nothing<br \/>\nconn.close<br \/>\nset conn=nothing<br \/>\nc_title=htmlencode(c_title)<br \/>\nc_content=htmlencode(c_content)<br \/>\nmb_code=replace(mb_code,&quot;$cntop{LogContent}quot;,now())<br \/>\nmb_code=replace(mb_code,&quot;$cnleft{LogContent}quot;,c_title)<br \/>\nmb_code=replace(mb_code,&quot;$cnright{LogContent}quot;,c_content)<br \/>\n%&gt;<\/p>\n<p>&lt;%&#39;\u751f\u6210HTML\u9875\u9762<br \/>\nSet fso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)<br \/>\nSet fout = fso.CreateTextFile(Server.MapPath(c_filepath))<br \/>\nfout.WriteLine mb_code<br \/>\nfout.close<br \/>\n%&gt;<br \/>\n&lt;%response.redirect(&quot;showit.asp&quot;)%&gt;<br \/>\n&lt;%end if%&gt;<\/p>\n<p>&lt;%<br \/>\nif id&lt;&gt;&quot;&quot; then<br \/>\nSet rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br \/>\nsql=&quot;select * from c_news where c_id=&quot;&amp;id<br \/>\nrs.Open sql,conn,1,1<br \/>\nc_id=rs(&quot;c_id&quot;)<br \/>\nc_filepath=rs(&quot;c_filepath&quot;)<br \/>\nc_title=rs(&quot;c_title&quot;)<br \/>\nc_content=rs(&quot;c_content&quot;)<br \/>\nend if<br \/>\n%&gt;<\/p>\n<p>&lt;form action=&quot;change.asp&quot; method=&quot;post&quot;&gt;<br \/>\nTitle:&lt;input type=&quot;text&quot; name=&quot;c_title&quot; value=&lt;%=c_title%&gt;&gt;&lt;br&gt;<br \/>\nContent:&lt;br&gt;<br \/>\n&lt;textarea name=&quot;c_content&quot; rows=&quot;8&quot; cols=&quot;30&quot;&gt;&lt;%=c_content%&gt;&lt;\/textarea&gt;&lt;br&gt;<br \/>\n&lt;input type=&quot;submit&quot; value=&quot;change&quot; name=&quot;submit&quot;&gt;<br \/>\n&lt;input type=&quot;reset&quot; value=&quot;Reset&quot;&gt;<br \/>\n&lt;input name=&quot;c_id&quot; type=&quot;hidden&quot; value=&quot;&lt;%=id%&gt;&quot;&gt;<br \/>\n&lt;input name=&quot;c_filepath&quot; type=&quot;hidden&quot; value=&quot;&lt;%=c_filepath%&gt;&quot;&gt;<br \/>\n&lt;\/form&gt;<\/p><\/div>\n<\/div>\n<p>8\uff0c\u5220\u9664\u8bb0\u5f55\u9875del.asp<\/p>\n<p>\u540c\u6837\uff01\u5220\u9664\uff0c\u9664\u4e86\u5220\u9664\u6570\u636e\u5e93\u8868\u4e2d\u7684\u8bb0\u5f55\uff0c\u4e0e\u5176\u5bf9\u5e94\u7684HTML\u9875\u9762\u4e5f\u9700\u5220\u9664\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"quote\">\n<div class=\"quote-title\">\u5f15\u7528\u81ea <u><\/u><\/div>\n<div class=\"quote-content\">&lt;!&#8211;#include file=&quot;conn.asp&quot; &#8211;&gt;<\/p>\n<p>&lt;%<br \/>\nc_id = request.querystring(&quot;c_id&quot;)<br \/>\nsql = &quot;Select * from c_news where c_id=&quot;&amp;c_id<br \/>\nSet rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br \/>\nrs.Open sql,conn,2,3<\/p>\n<p>filepath=rs(&quot;c_filepath&quot;)<br \/>\nSet fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br \/>\nfso.DeleteFile(Server.mappath(filepath))<br \/>\nSet fso = nothing<\/p>\n<p>rs.delete<br \/>\nrs.close<br \/>\nSet rs = Nothing<br \/>\nconn.close<br \/>\nset conn=nothing<br \/>\n%&gt;<\/p>\n<p>&lt;%response.redirect(&quot;showit.asp&quot;)%&gt;<\/p><\/div>\n<\/div>\n<p>\u56db\uff0c\u5176\u5b83\u529f\u80fd<\/p>\n<p>\u6a21\u677f\u7ba1\u7406\u9875\u9762\uff1a<\/p>\n<p>\u4e0d\u4f1a\u6bcf\u6b21\u90fd\u662f\u6253\u5f00\u6570\u636e\u5e93\u8868\u8fdb\u884c\u589e\u52a0\u6216\u8005\u4fee\u6539\u6a21\u677f\u4ee3\u7801\u5427\uff0c\u6240\u4ee5\uff0c\u7ba1\u7406\u4ee3\u7801\u7684\u9875\u9762\u7a0b\u5e8f\u4e0d\u80fd\u5c11\u4e86\uff0c\u81ea\u5df1\u6363\u9f13\u4e0b\u5e94\u8be5\u5f88\u7b80\u5355\u7684\u3002\u5f53\u7136\uff0c\u4e4b\u524d\u7ba1\u7406\u5458\u7684\u767b\u5f55\u8ba4\u8bc1\u7a0b\u5e8f\u5c31\u4e0d\u5728\u4e66\u4e2d\u4ea4\u4ee3\u4e86\uff1a\uff09\u8fd8\u6709\uff0c\u5982\u679c\u8bbe\u8ba1\u4e86\u591a\u4e2a\u6a21\u677f\uff0c\u90a3\u4e48\u5728\u53d1\u8868\u4fe1\u606f\u7684\u65f6\u5019\u5e94\u6dfb\u52a0\u6a21\u677f\u9009\u62e9\u5355\u9009\u6846\uff0c\u540c\u6837\u5728\u6267\u884c\u8f6c\u6362HTML\u65f6\uff0cSQL\u9009\u62e9\u7684\u4e0d\u540cm_id\u4e86\u3002<\/p>\n<p>\u4e0d\u7ba1\u600e\u4e48\u8bf4\uff0c\u5148\u628a\u8fd9\u4e9b\u6280\u672f\u81ea\u5df1\u8c03\u8bd5\u611f\u53d7\u4e0b\u3002\u591a\u591a\u64cd\u4f5c\uff0c\u76f8\u4fe1\u201c\u8bfb\u4e66\u5343\u904d\uff0c\u5176\u610f\u81ea\u89c1\u201d\u3002<\/p>\n<p>\u8c03\u8bd5\u5730\u5740\uff1a www.cnbruce.com\/test\/asp2html\/showit.asp<\/p>\n<p>\u6587\u4ef6\u4e0b\u8f7d\uff1a www.cnbruce.com\/test\/asp2html\/asp2html.rar<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5e0c\u671b\u5927\u5bb6\u770b\u5230\u8be5\u6807\u9898\u5c31\u80fd\u8ba9\u60f3\u8c61\u5230\u5b83\u7684\u529f\u80fd\uff1a 1\uff0c WITH TEMPLET\u610f\u601d\u662f\uff0c\u751f\u6210\u7684\u9875\u9762\u67b6\u6784\u5c06\u91c7\u7528\u67d0\u4e2a\u5df2\u8bbe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=383"}],"version-history":[{"count":0,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}