anvil_php/app/core/Response.php

27 lines
405 B
PHP

<?php
class Response {
private $_anvil;
public function __construct($a) {
$this->_anvil = $a;
}
public function badrequest($txt="Bad Request") {
header('HTTP/1.0 400 Bad Request');
echo $txt;
}
public function notfound($txt="Page Not Found") {
header('HTTP/1.0 404 Not Found');
echo $txt;
}
public function redirect($url) {
header('Location: '.$url);
}
}
?>