|
1234567891011121314151617181920212223242526 |
- <?php
- include "header.php";
- $nom = "dark.mp3";
-
- $uploaddir = './medias/'.$hash.'/';
- $uploadfile = $uploaddir . basename($nom);
-
- $extensions_valides = array( 'mp3' );
- $extension_upload = strtolower( substr( strrchr($_FILES['userfile']['name'], '.') ,1) );
-
- if ( in_array($extension_upload,$extensions_valides) ) {
-
- $resultat = move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile);
-
- if ($resultat) header("location:index.php?msg=9");
- else {
- header("location:index.php?msg=10");
- }
-
- }
-
- else {
- header("location:index.php?msg=10");
- }
-
- ?>
|