一月 2006


php19 一 2006 06:39 上午

打开libraries/config.default.php/

默认的PHPmyadmin config是不用验证直接访问,http及cookie均要求先通过验证

$cfg['Servers'][$i]['controluser']   = ”;    
$cfg['Servers'][$i]['controlpass']   = ”;      
$cfg['Servers'][$i]['user']          = ”;   // MySQL user
$cfg['Servers'][$i]['password']      = ”;   // MySQL password (only needed
$cfg['Servers'][$i]['only_db']       = ”;   // If set to a db-name, only

修改

$cfg['Servers'][$i]['auth_type']     = ‘cookie’;    // Authentication method (config, http or cookie based)?$cfg['Servers'][$i]['auth_type'] =

改为cookie,并设置

$cfg['blowfish_secret'] = ”;//随便添加一个秘密值

保存上传就能实现PHPmyadmin web验证了

javaee05 一 2006 06:38 上午

来到微软的下载中心(downloads center) http://www.microsoft.com/downloads/

搜索字符串 JDBC

搜索结果中 SQL Server 2000 Driver for JDBC SP3就是Sqlserver 2000JDBC的驱动了

Title Release Date Popularity
SQL Server 2000 Driver for JDBC SP3

The Microsoft SQL Server 2000 Driver for JDBC is a Type 4 JDBC driver that provides highly scalable and reliable connectivity for the enterprise Java environment. This driver provides JDBC access to SQL Server 2000 through any Java-enabled applet, application, or application server.
JDBC连接SQLserver2000数据库类
import java.sql.*;

public class Database {
Connection conn;
Statement stmt;
ResultSet rs;
public Database() {
try {
Class.forName(“com.microsoft.jdbc.sqlserver.SQLServerDriver”).
newInstance();
} catch (ClassNotFoundException e) {

} catch (IllegalAccessException ex) {

} catch (InstantiationException ex) {

}

try {
String url =
“jdbc:microsoft:sqlserver://localhost:1433;databasename=testDb”;
String user = “”;
String password = “”;

conn = DriverManager.getConnection(url, user, password); //获得连接
stmt = conn.createStatement(); //获得执行SQL语言的容器
String sql = “select * from testTable”;
rs = stmt.executeQuery(sql); //获得结果集
while (rs.next()) {
System.out.println(rs.getString(1)); //拿到结果集中的第一列
}

} catch (SQLException e) {

}
}
}