新学asp<%
新学asp
dim conn,connstr
新学asp
On Error Resume Next
新学asp
set Conn = server.CreateObject("ADODB.Connection")
新学aspconnstr
="Provider=MSDATASHAPE;Driver={SQL Server};Server=***;Database=***;User ID=***;Password=***"
新学aspconn.Open connstr
新学asp%
>
新学asp
开始在一个文件里放这样的代码,说明数据库的连接
在其他页面<!--#include file="Config/WebConfig.asp"-->用这样的代码就声明出数据库的连接
新学asp<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
新学asp
<!--#include file="Config/WebConfig.asp"-->
新学asp
<html xmlns="http://www.w3.org/1999/xhtml">
新学asp
<head>
新学asp
<title>发布新闻</title>
新学asp
</head>
新学asp
<body>
>
这样就实现了新闻的添加。

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2021-07-08
  • 2022-01-16
  • 2021-12-29
  • 2021-07-15
  • 2021-05-27
  • 2021-12-31
猜你喜欢
  • 2021-11-09
  • 2022-02-28
  • 2022-12-23
  • 2021-05-21
  • 2021-10-16
  • 2022-12-23
  • 2021-05-23
相关资源
相似解决方案