amdp3-metaforums/Application/HTTP/File.php
2019-11-21 04:01:19 +07:00

19 lines
420 B
PHP

<?php
namespace Application\HTTP;
class File {
private $data;
public function __construct($data) {
$this->data = $data;
}
public function move($path) {
move_uploaded_file($this->data["tmp_name"],$path);
}
public function name() {
return $this->data["name"];
}
public function extension() {
return pathinfo($this->data["name"],PATHINFO_EXTENSION);
}
}