src/Http/File.php
public function upload($filename, $destination)
    {
        if (isset($this[$filename])) {
            $file = $this[$filename];
            if (is_uploaded_file($file[static::TMP_NAME])) {
                try {
                    return move_uploaded_file($file[static::TMP_NAME], $destination);
                } catch (\Exception $e) {
                    var_dump($e->getMessage());
                    exit();
                }
            }
        }
        return false;
    }
public function upload($filename, $destination)
    {
        if (isset($this[$filename])) {
            $file = $this[$filename];
            if (is_uploaded_file($file[static::TMP_NAME])) {
                try {
                    return move_uploaded_file($file[static::TMP_NAME], $destination);
                } catch (\Exception $e) {
                    var_dump($e->getMessage());
                    exit();
                }
            }
        }
        return false;
    }
public function upload ( $ filename , $ destination ) { if ( isset ( $ this [ $ filename ] ) ) { $ file = $ this [ $ filename ] ; if ( is_uploaded_file ( $ file [ static :: TMP_NAME ] ) ) { try { return move_uploaded_file ( $ file [ static :: TMP_NAME ] , $ destination ) ; } catch ( \ Exception $ e ) { var_dump ( $ e -> getMessage ( ) ) ; exit ( ) ; } } } return false ; }
Upload a file to the destination on the server

@param array $filename
A $_FILE item name
@param string $destination
The destination file path

@return boolean true on success, exit() if not
Upload a file to the destination on the server