PHP7 - 连接到 sybase 数据库
PHP7 - Connect to sybase database
http://php.net/manual/en/function.sybase-connect.php 从 PHP7.
中删除
所以现在我收到了这个错误:
PHP Fatal error: Uncaught Error: Call to undefined function sybase_connect()
我现在应该如何使用 PHP7 连接到 sybase?
您正在使用 Ubuntu 16.04,因此在安装 php7.0-sybase package in your system, you are able to connect with Sybase database using pdo_dblib
之后
Example #1 PDO_DBLIB DSN examples
sybase:host=localhost;dbname=testdb
跟随一般PDO reference,你创建这样的连接
$databaseHandler = new PDO('sybase:host=localhost;dbname=testdb', $user, $pass);
http://php.net/manual/en/function.sybase-connect.php 从 PHP7.
中删除所以现在我收到了这个错误:
PHP Fatal error: Uncaught Error: Call to undefined function sybase_connect()
我现在应该如何使用 PHP7 连接到 sybase?
您正在使用 Ubuntu 16.04,因此在安装 php7.0-sybase package in your system, you are able to connect with Sybase database using pdo_dblib
之后Example #1 PDO_DBLIB DSN examples
sybase:host=localhost;dbname=testdb
跟随一般PDO reference,你创建这样的连接
$databaseHandler = new PDO('sybase:host=localhost;dbname=testdb', $user, $pass);