cms.sftp-download-file-local.php 596 B

1234567891011121314151617
  1. <?php
  2. if(core::ifPost("from")){
  3. header('Content-type: application/octet-stream;');
  4. header('Content-Transfer-Encoding: base64');
  5. header('Content-Disposition: attachment; filename="'.core::getPost("file").'"');
  6. historique::recRef("/proweb-export-csv.html");
  7. historique::add(array(
  8. "idType" => historique::getIdRef("ACTION"),
  9. "idUser" => session::getId(),
  10. "idPage" => historique::getIdRef("/proweb-export-csv.html"),
  11. "log" => "Téléchargement du fichier local ". core::getPost("file")
  12. ));
  13. readfile(SFTP_LOCAL.core::getPost("file"));
  14. }