-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.php
46 lines (39 loc) · 1.01 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* MP4Info Test Script
*
* @author Tommy Lacroix <[email protected]>
* @copyright Copyright (c) 2006-2009 Tommy Lacroix
* @license LGPL version 3, http://www.gnu.org/licenses/lgpl.html
* @package php-mp4info
* @link $HeadURL$
*/
// ---
include "MP4Info.php";
print '<h1>MP4Info test script</h1>';
print '<p><small>'.__FILE__.' $Id$</small></p>';
print '<hr />';
MP4Info::$debugMode = true;
$dir = './TestFiles/';
$de = opendir($dir);
if ($de) {
while (($file = readdir($de)) !== false) {
$path = $dir.$file;
if ((!is_file($path)) || (!is_readable($path))) continue;
print '<h2>'.$file.'</h2>';
print "<pre>";
try {
print_r(MP4Info::getInfo($path));
} catch (MP4Info_Exception $e) {
print 'Caught MP4Info_Exception with message '.$e->getMessage();
throw ($e);
} catch (Exception $e) {
print 'Cauth Exception with message '.$e->getMessage();
throw ($e);
}
print "</pre>";
print '<hr/>';
}
} else {
print '<strong>Could not open directory "'.$dir.'".';
}