本文整理匯總了PHP中error::index方法的典型用法代碼示例。如果您正苦於以下問題:PHP error::index方法的具體用法?PHP error::index怎麽用?PHP error::index使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類error
的用法示例。
在下文中一共展示了error::index方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: error
function error()
{
require 'Controllers/error.php';
$controller = new error();
$controller->index();
return false;
}
示例2: Error
public static function Error()
{
Session::flush('sure', Messages::_404());
require_once SITE_PATH . '/app/controllers/error_controller.php';
$control = new error();
$control->index();
return FALSE;
}
示例3: Error
public static function Error()
{
Session::flush('sure', '404: Page does not exists!<br/>Are you sure what you are looking for?');
require_once SITE_PATH . '/app/controllers/error_controller.php';
$control = new error();
$control->index();
return FALSE;
}
示例4: update
public function update($table, $data, $where)
{
ksort($data);
$datastring = '';
foreach ($data as $key => $value) {
$datastring .= "`{$key}`=:{$key}, ";
}
$datastringcleaned = rtrim($datastring, ', ');
$query = $this->prepare("UPDATE {$table} SET {$datastringcleaned} WHERE {$where};");
foreach ($data as $key => $value) {
$query->bindValue($key, $value);
}
if (!$query->execute()) {
require_once CONTROLLER_FOLDER . 'error.php';
$e = new error();
$e->index();
return false;
} else {
return true;
}
}