14 lines
281 B
PHP
14 lines
281 B
PHP
|
<?php
|
||
|
namespace Post;
|
||
|
|
||
|
class FileUpload extends FormField {
|
||
|
protected $file;
|
||
|
protected $error=UPLOAD_ERR_NO_FILE;
|
||
|
|
||
|
public function loadFromEnv($name) {
|
||
|
$this->error=$_FILES[$name]['error'];
|
||
|
$this->value=$_FILES[$name]['name'];
|
||
|
$this->file=$_FILES[$name]['tmp_name'];
|
||
|
}
|
||
|
}
|