【PHP】フレームワーク CakePHP
■ このスレッドは過去ログ倉庫に格納されています
002521
2006/11/30(木) 14:42:13ID:???/trunk/cake/libs/dbo_factory.php
76 // special case for PEAR:DB -- driver name in the form of 'pear-drivername'
77 elseif (preg_match('#^pear[\-_](.*)$#i', $config['driver'], $res))
78 {
79 uses('dbo/dbo_pear');
80 $config['driver'] = $res[1];
81
82 $instance = array(new DBO_Pear($config));
83 }
/trunk/cake/libs/model/dbo_pear.php
62 function connect ($config)
63 {
64 $this->config = $config;
65
66 $dsn = $config['driver'].'://'.$config['login'].':'.$config['password'].'@'.$config['host'].'/'.$config['database'];
67 $options = array(
68 'debug' => DEBUG-1,
69 'portability' => DB_PORTABILITY_ALL,
70 );
71
72 $this->_pear =& DB::connect($dsn, $options);
73
74 return !(PEAR::isError($this->_pear));
75 }
うん、最近始めたばっかりでよく分かってないんだ。(趣味PGのFW初挑戦で手探り状態だし)
■ このスレッドは過去ログ倉庫に格納されています