Php 上传的mp3格式文件的标题
可能重复:Php 上传的mp3格式文件的标题,php,javascript,Php,Javascript,可能重复: 我有这个表格,我上传的mp3文件,但我希望用户上传音乐和所有细节,如作者,标题等mp3应自动填写在表单字段。我使用php,并希望任何php/javascript方法,可以找到文件名从本地机,并把这个名字在我的表单标题字段 我的表格如下。我不希望用户输入标题、作者等 <form enctype="multipart/form-data" method="post" action="http://youshare.ca/music/writestorypost"><p
我有这个表格,我上传的mp3文件,但我希望用户上传音乐和所有细节,如作者,标题等mp3应自动填写在表单字段。我使用php,并希望任何php/javascript方法,可以找到文件名从本地机,并把这个名字在我的表单标题字段 我的表格如下。我不希望用户输入标题、作者等
<form enctype="multipart/form-data" method="post" action="http://youshare.ca/music/writestorypost"><p><span class="form_label">Name of the song</span><input type="text" value="" name="title" style="width:400px" class="inputText required"></p><p><span class="form_label">Description</span>
<textarea class="rich" style="width:580px" rows="18" name="form_content"></textarea>
</p><p><span class="form_label">Tags</span>
<input type="text" value="" style="width:300px" name="tags" class="inputText">
<span>Multiple tags should be Separated with commas(,)</span>
</p>
<p><label>Upload</label><input type="file" name="song">
<span>Only mp3 is accepted</span></p>
<p><label>Music source</label>
<input type="radio" checked="1" value="own" name="musicsource">My own
<input type="radio" value="others" name="musicsource">From another musician
</p>
<div style="display:none" id="ms_others">
<p><label>Musician name</label><input name="musician"></p>
</div>
<div id="ms_own">
<p></p>
</div>
<p><label>Picture (Optional)</label><input type="file" name="picture">
<span>A picture about the song or the musician</span></p>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("input[value='own']").click(
function() {
$("#ms_others").hide();
$("#ms_own").fadeIn();
}
);
$("input[value='others']").click(
function() {
$("#ms_own").hide();
$("#ms_others").fadeIn();
}
);
})
</script><p><input type="submit" value="Submit" class="button"></p><input type="hidden" value="935" name="page_id"></form>
歌曲名称描述
标签
多个标记应使用逗号(,)分隔
上传
只接受mp3
音乐源
我自己的
来自另一位音乐家
音乐家姓名
图片(可选)
关于歌曲或音乐家的照片
jQuery(文档).ready(函数($){
$(“输入[value='own'])。单击(
函数(){
$(“#ms_others”).hide();
$(“#ms#own”).fadeIn();
}
);
$(“输入[value='others'])。单击(
函数(){
$(“#ms#own”).hide();
美元(“#ms#u others”).fadeIn();
}
);
})
上传文件后,您需要填写MP3的详细信息,除非他们手动键入所有信息
在PHP端,您可以安装以下内容:
这里有一些关于如何从文件中读取ID3标记的示例。请减少此处的代码量,只发布对您尝试执行的操作至关重要的内容。我不同意您的看法。你只需上传youtube上的任何视频。上传标题的那一刻会自动到来,但文件刚刚开始上传