upload php problem

0

Can anyone tell me why the file is not being received in the destination folder?

private $id;
private $entrada;
private $saida;
private $status;

public function __construct($bd) {
    $this->bd = $bd;        
}

public function construirObjeto($entrada, $saida, $status) {
    $this->entrada = $entrada;
    $this->saida = $saida;
    $this->status = $status;
}    

public function inserir(){

    $origem = $_FILES["arquivo"]["tmp_name"];


    $entradaa = "emboss/aaindexextract/" . $_FILES["arquivo"]["name"];


    if($entradaa){                 
        $sql = "INSERT INTO caminhoarquivo(entrada, saida, status) VALUES ('$entradaa', 'NULL', 'SOLICITADO')";

        $this->bd->executarSql($sql);
    }else{
        echo "Erro!";
    }

    //salva foto no diretorio
    move_uploaded_file($origem, $entradaa);

}

    
asked by anonymous 02.08.2017 / 02:32

1 answer

0

Problem Solution

attribute missing: enctype, in form tag

<form action="#" method="POST" enctype="multipart/form-data">
    
02.08.2017 / 02:57