Php 用于连接到数据库的zend核心文件
我正在使用一个连接到sybase数据库的工作zend应用程序。我不熟悉这个框架。有人能告诉我zend中使用了哪些核心文件来连接数据库吗 假设这些是application.ini文件中的数据库参数Php 用于连接到数据库的zend核心文件,php,zend-framework,Php,Zend Framework,我正在使用一个连接到sybase数据库的工作zend应用程序。我不熟悉这个框架。有人能告诉我zend中使用了哪些核心文件来连接数据库吗 假设这些是application.ini文件中的数据库参数 resources.db.params.host = "servername" resources.db.params.username = "username" resources.db.params.password = "password" resources.db.params.dbname =
resources.db.params.host = "servername"
resources.db.params.username = "username"
resources.db.params.password = "password"
resources.db.params.dbname = "db1"
我需要查看core中使用的所有非zend函数,这样我就可以在php中建立到sybase的连接(与zend相同)。
希望我足够清楚 在Zend项目树中,查找
Library/Zend/Db/Adapter
此文件夹具有用于不同数据库类型的适配器。在Zend项目树中,查找
Library/Zend/Db/Adapter
此文件夹具有用于不同数据库类型的适配器。它只是将PHP的数据库函数与适配器一起使用
有关更多详细信息,请参阅。它只是将PHP的数据库函数与适配器一起使用
有关更多详细信息,请参阅。我在Base.php文件中找到了一些有用的信息。 因此,这个zend应用程序使用php sybase函数来连接数据库,而不是pdo
if($this->pdoConnection)
AppliName_Model_Base::$globConn = new PDO('dblib:host='.self::$dbConfig['host'].';dbname='
.self::$dbConfig['name'].';charset='
.self::$dbConfig['charset'],self::$dbConfig['user'] ,self::$dbConfig['password']);
else{
sybase_min_server_severity(11);
sybase_connect(self::$dbConfig['host'],self::$dbConfig['user'],self::$dbConfig['password'],self::$dbConfig['charset']);
AppliName_Model_Base::$globConn = sybase_select_db(self::$dbConfig['name']);
}
我在php文件中进行了相同的连接:
$link = sybase_connect(DBHOST, DBUSER, DBPASSWORD, DBCHARSET) or die("no connection!");
它正在工作。我在Base.php文件中找到了一些有用的信息。 因此,这个zend应用程序使用php sybase函数来连接数据库,而不是pdo
if($this->pdoConnection)
AppliName_Model_Base::$globConn = new PDO('dblib:host='.self::$dbConfig['host'].';dbname='
.self::$dbConfig['name'].';charset='
.self::$dbConfig['charset'],self::$dbConfig['user'] ,self::$dbConfig['password']);
else{
sybase_min_server_severity(11);
sybase_connect(self::$dbConfig['host'],self::$dbConfig['user'],self::$dbConfig['password'],self::$dbConfig['charset']);
AppliName_Model_Base::$globConn = sybase_select_db(self::$dbConfig['name']);
}
我在php文件中进行了相同的连接:
$link = sybase_connect(DBHOST, DBUSER, DBPASSWORD, DBCHARSET) or die("no connection!");
它正在工作。谢谢你的信息,我检查。谢谢你的信息,我检查。谢谢你的回复,实际上我发现这个zend应用程序在Base.php文件中使用了php sybase函数。谢谢你的回复,实际上我发现这个zend应用程序在Base.php文件中使用了php sybase函数。