1
I would like to send a file to a input
guy file
and recover the complete file path.
If anyone knows anything like that will be very useful to me.
1
I would like to send a file to a input
guy file
and recover the complete file path.
If anyone knows anything like that will be very useful to me.
1
$caminhoArquivo = "";
$diretorio = $_POST['nome_diretorio'];
if (file_exists($diretorio)&&is_dir($diretorio )) {
// mova o upload para esse diretório
caminhoArquivo = $diretorio."/".$nomeUpload;
} else {
// como o diretório informado não existe, é preciso criá-lo
if (mkdir($diretorio , 0777)) {
// mova o upload para esse diretório
caminhoArquivo = $diretorio."/".$nomeUpload;
} else {
echo "Falha ao criar diretório";
}
}
You could explain your solution?
I don’t quite understand your explanation.
-1, because apparently has no relation to the question. I will reverse if clarification occurs.
Browser other questions tagged javascript drag-n-drop
You are not signed in. Login or sign up in order to post.
What language are you using?
– Laerte
PHP or JAVASCRIPT
– Falbo
What is the use of this??? I see no other than trying to hack some site
– Iago Leão
You want to upload and get the file path on the server, or get the path on the client machine?
– bfavaretto
I’m making an intranet where people have to put the server path. To facilitate I need the person to choose the file and I will save the path in the database.
– Falbo
Which language you use or will use?
– noNihongo
I’m sorry, but it’s still unclear. If you are trying to take the local file path (before uploading) via javascript, this does not work in some browsers, for security reasons.
– bfavaretto
To try to clarify, the user drags a file to the drag-n-drop, when that file falls in that area, you want to extract the local path of the same type
c:\bananas\homem.txt
and store in the database, that’s it?– Zuul
That’s right. How can I?
– Falbo
Someone has the answer??
– Falbo