为什么我的网站MP3播放器不起作用?

时间:2013-06-17 02:30:56

标签: php html

嗨我的音乐歌曲网站有问题。我正在从我的电脑上传一首mp3歌曲,想在我的网站上播放它。但是不知道为什么mp3文件名没有出现在播放器src attribut中。

有人能帮助我吗?

<body>
<div id="main_container">
<form method="post" action='exercice.php' id="form1">
<input type="file" name="files" id="files" onChange="submitForm();">            
</form>
<?php
if (isset($_FILES['files'])){
move_uploaded_file($_FILES['files']['tmp_name'], "uploaded/");
}
$src = isset($_FILES['files']['name'])?$_POST['files']['name']:'';  
?>      
<object id="MediaPlayer1" width="800" height="500" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"           codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
        standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject">
        <param id="fileName" name="FileName" value='uploaded/<?php echo $src; ?>' />
        <param name="AutoStart" value="false" />
        <param name="DefaultFrame" value="mainFrame" />
        <param name="ShowStatusBar" value="0" />
        <param name="ShowPositionControls" value="0" />
        <param name="showcontrols" value="0" />
        <param name="ShowAudioControls" value="0" />
        <param name="ShowTracker" value="0" />
        <param name="EnablePositionControls" value="0" />


        <!-- BEGIN PLUG-IN HTML FOR FIREFOX-->
        <embed  type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
            src='uploaded/<?php echo $src; ?>' align="middle" width="800" height="500" defaultframe="rightFrame"
             id="MediaPlayer2" />
        </object>
</div>
</body>
</html>

0 个答案:

没有答案