我有这个文件:
[playlist]
numberofentries=4
File1=http://108.61.73.119:8128
Title1=(#1 - 266/1000) 181.FM - POWER 181 -=[: The Hitz Channel :]=- www.181.fm
Length1=-1
File2=http://108.61.73.118:8128
Title2=(#2 - 318/1000) 181.FM - POWER 181 -=[: The Hitz Channel :]=- www.181.fm
Length2=-1
File3=http://108.61.73.117:8128
Title3=(#3 - 401/1000) 181.FM - POWER 181 -=[: The Hitz Channel :]=- www.181.fm
Length3=-1
File4=http://198.27.79.224:9770
Title4=(#4 - 27/50) 181.FM - POWER 181 -=[: The Hitz Channel :]=- www.181.fm
Length4=-1
Version=2
我想解析它并只获取文件和标题。问题是 parse_ini_file 给了我虚假错误。我尝试了正常的方式,就像我会解析文本文件一样,但是由于修剪过多而变得复杂。
有什么想法吗?
php:
$streams = parse_ini_file("tunein-station.pls", true);
print_r($streams);
错误:
PHP Warning: parse error in tunein-station.pls on line 4\n