sid/manager/import.php

16 lines
428 B
PHP
Raw Normal View History

<?php define('__ROOT__', dirname(dirname(__FILE__)) ); require_once __ROOT__.'/manager/security.php';
if( isset($_FILES['file']) && isset($_POST['filename']) ){
$path = __ROOT__.'/src/files/';
$targetFile = $_SESSION['identifiant'].'_'.$_POST['filename'].'.xlsx';
if( move_uploaded_file($_FILES["file"]["tmp_name"], $path.$targetFile) )
echo "success";
else
echo "error";
}else
echo 'missing_param';
?>