diff --git a/lib/Request.php b/lib/Request.php index af67d42..45ba7f7 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -53,28 +53,6 @@ function file_content($field) } -function file_info($field) -{ - if (isset($_FILES[$field])) { - return array( - 'name' => $_FILES[$field]['name'], - 'mimetype' => $_FILES[$field]['type'], - 'size' => $_FILES[$field]['size'], - ); - } - - return false; -} - - -function file_move($field, $destination) -{ - if (isset($_FILES[$field]) && ! file_exists($destination)) { - @mkdir(dirname($destination), 0777, true); - move_uploaded_file($_FILES[$field]['tmp_name'], $destination); - } -} - function uri() { @@ -86,9 +64,3 @@ function is_post() { return $_SERVER['REQUEST_METHOD'] === 'POST'; } - - -function is_get() -{ - return $_SERVER['REQUEST_METHOD'] === 'GET'; -} diff --git a/lib/Response.php b/lib/Response.php index b74db76..e8dd552 100644 --- a/lib/Response.php +++ b/lib/Response.php @@ -8,12 +8,6 @@ function force_download($filename) } -function content_type($mimetype) -{ - header('Content-Type: '.$mimetype); -} - - function status($status_code) { $sapi_name = php_sapi_name(); @@ -77,17 +71,6 @@ function xml($data, $status_code = 200) } -function js($data, $status_code = 200) -{ - status($status_code); - - header('Content-Type: text/javascript; charset=utf-8'); - echo $data; - - exit; -} - - function raw($data, $status_code = 200) { status($status_code);