2010”N08ŒŽ26“ú

DEBUG=0‚Å‚àADBÚ‘�}ƒGƒ‰[‚ð•\Ž¦

DEBUGÝ’è‚ð0‚É‚µ‚��‚Ä‚àAMySQL‚ª“®ì‚µ‚��‚È‚¯‚ê‚΃Gƒ‰[‚ð•\Ž¦‚³‚¹‚é‚ɂ́B

app_controller.php ‚ɉº‹L‚̂悤‚ɏ‘‚��‚Ä‚Ý‚Ü‚µ‚½B

(1)‚Ü‚¸A‰º‹L‚ð classéŒ¾"class AppController extends...."‚Ì‘O‚ɒljÁB
 
uses('model'.DS.'connection_manager');


(2)‚»‚ê‚©‚çA
 
function __construct() {
parent::__construct();

$db =& ConnectionManager::getDataSource('default');
if(empty($db->connection)){
echo "Database Connection Error! Check your DB.";
exit;
}
}


‚�}‚ê‚ÅOKB
posted by SDozono at 17:01| “Œ‹ž ☀| Comment(2) | TrackBack(0) | CakePHP General | ‚}‚̃uƒƒO‚Ì“ÇŽÒ‚É‚È‚é | XVî•ñ‚ðƒ`ƒFƒbƒN‚·‚é