Well, I have the following question: can I create a directory with mkdir and in the same PHP code insert files coming from uploads in this created directory?
For example I have a form where I get uploaded files, and I would like to create a folder and play those files in it at the same time, can I do it all in the same code so that I only use one action?
PHP code:
$vregistro = utf8_decode($_POST['f_registro']); //Recebe valor de um input
mkdir("C:\test\Arquivos\Documentos/$vregistro", 0777, true);
//Cria uma pasta com o nome designado na variável
$uploaddir = 'C:\test\Arquivos\Documentos/';
$uploadfile = $uploaddir . basename($_FILES['fanexo']['name']);
echo
if (move_uploaded_file($_FILES['fanexo']['tmp_name'], $uploadfile)) {