25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
555 B

  1. <?php
  2. include "header.php";
  3. $nom = "hard.mp3";
  4. $uploaddir = './medias/'.$hash.'/';
  5. $uploadfile = $uploaddir . basename($nom);
  6. $extensions_valides = array( 'mp3' );
  7. $extension_upload = strtolower( substr( strrchr($_FILES['userfile']['name'], '.') ,1) );
  8. if ( in_array($extension_upload,$extensions_valides) ) {
  9. $resultat = move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile);
  10. if ($resultat) header("location:index.php?msg=9");
  11. else {
  12. header("location:index.php?msg=10");
  13. }
  14. }
  15. else {
  16. header("location:index.php?msg=10");
  17. }
  18. ?>