2014-09-21 34 views
3

我試圖讓song name/artist name/song length/bitrate等從遠程.MP3文件
http://shiro-desu.com/scr/11.mp3

我已經試過getID3劇本,但據我所知它並不適用於遠程文件,我得到這個錯誤:「遠程文件不被支持的 - 請複製文件在本地第一」

此外,此代碼:PHP獲取元數據

<?php 
$tag = id3_get_tag("http://shiro-desu.com/scr/11.mp3"); 
print_r($tag); 
?> 

也沒有工作。
「致命錯誤:在/home4/shiro/public_html/scr/index.php調用未定義功能id3_get_tag()第2行」

+0

致命錯誤:調用未定義函數id3_get_tag()在/home4/shiro/public_html/scr/index.php在線2 – dimitris93 2014-09-21 02:41:56

回答

1

正如你沒有提到你的錯誤我正在考慮一個常見的錯誤情況undefined function

The error you get (undefined function) means the ID3 extension is not enabled in your PHP configuration:

如果你沒有ID3擴展文件。只是檢查here安裝信息。

+0

謝謝,我會安裝它,我沒有看到任何安裝鏈接http://php.net /manual/en/function.id3-get-tag.php這裏,所以我認爲它不需要任何 – dimitris93 2014-09-21 02:44:42

+0

你知道我怎麼能安裝我下載的.zip? – dimitris93 2014-09-21 02:47:51

+0

http://stackoverflow.com/questions/11709295/how-to-install-php-id3-on-wamp – 2014-09-21 02:50:59