2014-02-17 7 views
0

PHP에서 MP3 파일의 길이를 가져오고 싶습니다. Google에서 찾은 코드는 getID3에서 왔지만 작동하지 않습니다.getID3 unexppected mp3 길이 가져 오기 T_ECHO

나는 항상 다음과 같은 errormessage를 얻었고 어떻게 해결할 수 있는지 알지 못합니다.

PHP Parse error: syntax error, unexpected T_ECHO in /.../getDuration.php on line 17

내 PHP 코드 :

<?php 

$include = dirname(__FILE__). '/'; 

include_once $include . 'getid3.php'; 
include_once $include . 'getid3.lib.php'; 
include_once $include . 'module.audio.mp3.php'; 
include_once $include . 'module.tag.apetag.php'; 
include_once $include . 'module.tag.id3v1.php'; 
include_once $include . 'module.tag.id3v2.php'; 


$pathName = '/var/..../audio/audio.mp3'; 

$getID3 = new getID3; 
$ThisFileInfo = $getID3->analyze($pathName) 
echo $ThisFileInfo['playtime_string']; 

?> 

답변

2

당신은

$ThisFileInfo = $getID3->analyze($pathName); 
             //^------ Add one here 
+1

OMG의 감사 somtimes 내가 – Paixsn

+0

을 -.- 나를 때리는 그러나 알아야 할이 줄의 끝에 세미콜론을 놓친 내가 메시지를 정의하지 인덱스 : playtime_string 어쩌면 이유를 아십니까? – Paixsn

+0

'echo' 대신'var_dump ($ ThisFileInfo); '의 출력을 게시 할 수 있습니까? –