0
我想使用Doctrine DBAL,我从网站下载了DBAL文件夹。并将该文件夹放在我的服务器上。 ,然后将此代码写入我的文件。想使用Doctrine DBAL
use Doctrine\Common\ClassLoader;
require 'Doctrine/Common/ClassLoader.php';
$classLoader = new ClassLoader('Doctrine', 'Doctrine');
$classLoader->register();
$config = new \Doctrine\DBAL\Configuration();
//..
$connectionParams = array(
'dbname' => 'mydb',
'user' => 'user ',
'password' => 'password',
'host' => 'host',
'driver' => 'pdo_mysql',
);
$conn = DriverManager::getConnection($connectionParams);
$stmt = $conn->query($select_resellerData);
$fetch = $stmt->fetch();
print_r($fetch);
给我这个错误。
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/abhijitnair/sandbox/reseller dashboard/manual_population/populatenew.php on line 3
请建议我需要使用dbal。
感谢
是的,这是它,但现在我不能在5.2.11中使用Doctrine DBAL?我在公司,所以我如何更改运行的产品版本? – XMen 2011-03-15 08:59:47