在哪里可以找到 PEAR DB 错误代码列表?
我正在尝试使用 PEAR DB 建立与 mysql 数据库的连接。它向我抛出以下错误:
DB_Error 对象( [错误消息前缀] => [模式] => 1 [等级] =>第1024章-4 [留言] =>数据库错误:未找到 [用户信息] =>无法包含 DB/dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern.php 归档 'dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern' [回溯] =>数组 ( [0] => 数组 ( [文件] => /usr/local/php-5.2.14-2/share/pear/DB.php [行] =>第966章PEAR_错误 [类] => PEAR_Error [类型] => -> [参数] =>数组([0] => 数据库错误:不是 找到[1] => -4 [2] => 1 [3] => 1024 [4] =>无法包含 DB/dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern.php 归档 'dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern' ) ) [1] =>数组 ( [文件] => /usr/local/php-5.2.14-2/share/pear/PEAR.php [行] =>第531章数据库错误 [类] => DB_Error [对象] => DB_Error 对象RECURSION [类型] => -> [参数] =>数组 ( [0] => -4 [1] => 1 [2] => 1024 [3] => 无法包含 这 DB/dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern.php 归档 'dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern' ) ) [2] =>数组 ( [文件] => /usr/local/php-5.2.14-2/share/pear/DB.php [行] =>第543章引发错误 [类] => PEAR [对象] =>数据库对象 ( ) [类型] => -> [参数] =>数组([0] => [1] => -4 [2] => [3] => [4] =>无法包含 DB/dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern.php 归档 'dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern' [5] => DB_Error [6] => 1) ) [3] => 数组 ( [文件] => /nfs/c07/h04/mnt/xxxxx/domains/wedding.juicywatermelon.com/html/validate.php [行] => 9 [功能] =>连接 [类] => DB [对象] =>数据库对象( ) [类型] => -> [参数] =>数组([0] => dbxxxxx:[电子邮件受保护]/dbxxxxx_toomodern ) ) ) [回调] => ) 1
我的代码如下:
<?php
require_once('DB.php');
$db = new DB;
$db_host = 'internal-db.sxxxxx.gridserver.com';
$db_user = 'xxxxx';
$db_pass = 'xxxxx';
$db_name = 'xxxxx';
$dsn = "$db_user:$db_pass@$db_host/$db_name";
$resource = $db->connect($dsn);
}
任何人都可以在这里看到我的错误吗? 网上有 PEAR 错误索引吗,我一辈子都找不到它们!
I'm trying to establish a connection to a mysql database using PEAR DB. It's throwing the following error at me:
DB_Error Object (
[error_message_prefix] => [mode] => 1
[level] => 1024 [code] => -4
[message] => DB Error: not found
[userinfo] => Unable to include the
DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php
file for
'dbxxxxx:[email protected]/dbxxxxx_toomodern'
[backtrace] => Array ( [0] => Array (
[file] =>
/usr/local/php-5.2.14-2/share/pear/DB.php
[line] => 966 [function] => PEAR_Error
[class] => PEAR_Error [type] => ->
[args] => Array ( [0] => DB Error: not
found [1] => -4 [2] => 1 [3] => 1024
[4] => Unable to include the
DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php
file for
'dbxxxxx:[email protected]/dbxxxxx_toomodern'
) ) [1] => Array ( [file] =>
/usr/local/php-5.2.14-2/share/pear/PEAR.php
[line] => 531 [function] => DB_Error
[class] => DB_Error [object] =>
DB_Error Object RECURSION [type] =>
-> [args] => Array ( [0] => -4 [1] => 1 [2] => 1024 [3] => Unable to include
the
DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php
file for
'dbxxxxx:[email protected]/dbxxxxx_toomodern'
) ) [2] => Array ( [file] =>
/usr/local/php-5.2.14-2/share/pear/DB.php
[line] => 543 [function] => raiseError
[class] => PEAR [object] => DB Object
( ) [type] => -> [args] => Array ( [0]
=> [1] => -4 [2] => [3] => [4] => Unable to include the
DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php
file for
'dbxxxxx:[email protected]/dbxxxxx_toomodern'
[5] => DB_Error [6] => 1 ) ) [3] =>
Array ( [file] =>
/nfs/c07/h04/mnt/xxxxx/domains/wedding.juicywatermelon.com/html/validate.php
[line] => 9 [function] => connect
[class] => DB [object] => DB Object (
) [type] => -> [args] => Array ( [0]
=> dbxxxxx:[email protected]/dbxxxxx_toomodern
) ) ) [callback] => ) 1
my code is as follows:
<?php
require_once('DB.php');
$db = new DB;
$db_host = 'internal-db.sxxxxx.gridserver.com';
$db_user = 'xxxxx';
$db_pass = 'xxxxx';
$db_name = 'xxxxx';
$dsn = "$db_user:$db_pass@$db_host/$db_name";
$resource = $db->connect($dsn);
}
Can anyone see my error here?
Is there an index of PEAR errors online, I can't for the life of me find them!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还必须包含数据库类型,因此如果是 MySQL,则需要将其更改为
You also have to inlcude the DB type, so if it's MySQL, you would need to change it to