urlµØÖ·ÖØдʵÏÖaspα¾²Ì¬»¯_asp¼¼ÇÉ_ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØ--Powered by WWW.RONGSEN.COM.CN

urlµØÖ·ÖØдʵÏÖaspα¾²Ì¬»¯

×÷ÕߣººÚ¿Í·ÀÏßÍø°²Î¬»¤ À´Ô´£ººÚ¿Í·ÀÏßÍø°²Íøվά»¤»ùµØ ä¯ÀÀ´ÎÊý£º0

±¾Æª¹Ø¼ü´Ê£ºÎ±¾²Ì¬
ºÚ¿Í·ÀÏßÍø°²ÍøѶ£º
´Ë·½·¨ÊʺÏʹÓÃÐéÄâÖ÷»úµÄÅóÓÑ£¬ÊµÏÖЧ¹ûÀýÈç www.xxxx.com/xx.asp?id=1  ÖØд³É   www.xxxx.com/xx.asp?/1.html
Êý¾Ý¿âÊÇaccess£¬±íÃûarticle£¬ÀïÃæÓÐid£¬title£¬content 
config.aspÁ¬½ÓÊý¾Ý¿âÎļþ 
< % 
'¹¦ÄÜ


´Ë·½·¨ÊʺÏʹÓÃÐéÄâÖ÷»úµÄÅóÓÑ£¬ÊµÏÖЧ¹ûÀýÈç asp?id=1">www.xxxx.com/xx.asp?id=1  ÖØд³É   www.xxxx.com/xx.asp?/1.html
Êý¾Ý¿âÊÇaccess£¬±íÃûarticle£¬ÀïÃæÓÐid£¬title£¬content
config.aspÁ¬½ÓÊý¾Ý¿âÎļþ
< %
'¹¦ÄÜ£ºaspʵÏÖα¾²Ì¬µÄÀý×Ó
'Êý¾Ý¿âÁ´½Ó
db="data.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.open connstr
If Err Then
err.Clear
Set conn = Nothing
Response.Write "Êý¾Ý¿âÁ¬½Ó³ö´í£¬Çë¼ì²éÁ¬½Ó×Ö´®¡£"
Response.End
End If
'¶¨ÒåÐÂÎÅÔĶÁ½çÃæµÄ¶ÁÈ¡
Dim News_title,News_content
Sub ReadNews()
set rs1=server.createobject("adodb.recordset")
sql1="select id,title,content from article where id="& ID
rs1.open sql1,conn,3,3
News_title=rs1("title")
News_content=rs1("content")
rs1.close
set rs1=Nothing
End Sub
% >

index.aspÐÂÎÅÁбíÒ³


< !--#include file="config.asp"-- >
<ol>
< %
Set rs=server.CreateObject("adodb.recordset")
sql="select * from Article"
rs.open sql,conn,1,1
do while not rs.eof
% >
<li><a href="http://www.xxxx.com/article.asp?/< %=rs("id")% >.html">< %=left(trim(rs("title")),30)% ></a>< >
< %
rs.movenext
loop
rs.close
set rs=Nothing
% >
</ol>

article.aspÐÂÎÅÄÚÈÝÒ³
< !--#include file="config.asp"-- >
< %
id=request.QueryString("id")
If id="" Then
server_v40=Request.ServerVariables("QUERY_STRING")  //»ñÈ¡£¿ºǫ́µÄµØÖ·×Ö·û
id=Int(replace(replace(server_v40,"/",""),".html",""))  //»ñÈ¡idÖµ
End If
Call ReadNews()   //µ÷Óùý³Ì
% >
<div>
±êÌâ: <b>< %= News_title% ></b><br />
ÄÚÈÝ: < %=News_content% >
</div>
 

    ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤·½°¸±¾ÆªÁ¬½Ó£ºhttp://www.rongsen.com.cn/show-4200-1.html
Íøվά»¤½Ì³Ì¸üÐÂʱ¼ä:2010-09-15 20:39:55  ¡¾´òÓ¡´ËÒ³¡¿  ¡¾¹Ø±Õ¡¿
ÎÒÒªÉêÇë±¾Õ¾£ºNµã | ºÚ¿Í·ÀÏß¹ÙÍø |  
רҵ·þÎñÆ÷ά»¤¼°Íøվά»¤ÊÖ¹¤°²È«´î½¨»·¾³£¬ÍøÕ¾°²È«¼Ó¹Ì·þÎñ¡£ºÚ¿Í·ÀÏßÍø°²·þÎñÆ÷ά»¤»ùµØÕÐÉ̽øÐÐÖУ¡QQ:29769479

footer  footer  footer  footer