1
I would like to know how to find out which folder the user uploaded to the form?
For example, if the user uploaded from the folder X, if the file was inside the X folder, I would like to run the following code:
$upload = copy($arqTemp, $pasta . $nomePDF);
$pastaExcluir = "C:/Users/Administrador/Desktop/X/";
unlink($pastaExcluir . $arqName);
Or if he made one upload, out of the specific folder I simply use the move_uploaded_file()
:
$upload = move_uploaded_file($arqTemp, $pasta . $pdfName);
So, as i will find out by which folder was sent the file?
I’m not sure I understand your question. But when a user uploads a file, their data comes in the $_FILES variable. Files are immediately moved to the temporary folder of the server (usually /tmp on linux).
– jlHertel
For the sake of privacy (and it better be so) browsers do not send the actual paths of the source files. If your application depends on it, it is the case to rethink the problem and create another solution.
– Bacco
@Bacco, I rethought (long time(lie, were minutes)) and abandoned this idea kkkkk.
– UzumakiArtanis