i want to get the length of a MP3-File in PHP. The code i´ve found by google is from getID3, but it dosen't works.
I always get the following errormessage and i´dont know how i can fix it.
PHP Parse error: syntax error, unexpected T_ECHO in /.../getDuration.php on line 17
My PHP-Code:
<?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'];
?>
You missed a semicolon at the end of this line
$ThisFileInfo = $getID3->analyze($pathName);
//^------ Add one here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.