Размер файла: 568B
<?php
$mysql = array( 'host' => 'localhost',
'user' => 'root',
'pass' => '',
'db' => 'social',
'pref' => '_');
$mysqlHandle = @mysql_connect($mysql['host'], $mysql['user'], $mysql['pass']);
if($mysqlHandle)
{
if(@mysql_select_db($mysql['db'], $mysqlHandle))
{
return true;
}
else
{
$err = 2;
$smarty->assign('msg', 'Cannot Connect To Database.');
}
}
else
{
$err = 2;
$smarty->assign('msg', 'Cannot Connect: '.mysql_error());
}
if($err == 2)
$smarty->assign('page', 'm/db.tpl');
//exit();
?>