I want to upload a local file to a folder on a website. I am using a application in Windows Forms , with Microsoft VS Community 2017. Using Network.UploadFile () basically indicates the path of the local file and the address of the script that receives the file uploaded to the site.
When using a html and PHP form to upload a file, the file is received with $ _POST and moved to a definitive path with:
try{
foreach( $_FILES['files']['name'] as $data ){
$tempo = $_FILES['files']['tmp_name'][0];
if ( is_uploaded_file( $tempo ) ) {
$rutaDefinitiva = "carpetaWeb/".$NuevoNombreFile;
if( move_uploaded_file( $tempo, $rutaDefinitiva ) ){
}else{
}
}else{
}
}
}catch (Exception $e) {
...
}
But, when using Network.UploadFile () I do not know how to identify the uploading file to move it. Can a PHP be used to receive the file in this case? Any help to create the PHP script is appreciated in advance.