34 lines
469 B
PHP
34 lines
469 B
PHP
|
<?php
|
||
|
|
||
|
class Helper {
|
||
|
static function show($var) {
|
||
|
echo '<pre>';
|
||
|
print_r($var);
|
||
|
echo '</pre>';
|
||
|
}
|
||
|
|
||
|
static function show2($var) {
|
||
|
echo '<pre>';
|
||
|
var_dump($var);
|
||
|
echo '</pre>';
|
||
|
}
|
||
|
|
||
|
static function redirect($uri) {
|
||
|
header('Location: '.$uri);
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
static function reload($args = false, $anker = false) {
|
||
|
$dest = $_SERVER['PHP_SELF'];
|
||
|
if ($args)
|
||
|
$dest .= "?".$args;
|
||
|
|
||
|
if ($anker)
|
||
|
$dest .= "#".$anker;
|
||
|
|
||
|
Helper::redirect($dest);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|