如何用php解析.plist文件?

时间:2009-11-17 15:22:03

标签: php arrays post parsing plist

我可以用php解析一个plist文件并将它变成一个数组,比如$_POST[''],所以我可以调用$_POST['body']并获取具有<key> body的字符串吗? / p>

3 个答案:

答案 0 :(得分:22)

答案 1 :(得分:1)

谷歌搜索“php plist parser”出现了this博客文章,似乎能够做你想要的。

答案 2 :(得分:0)

Took a look at some of the libraries out there but they have external requirements and seem overkill. Here's a function that simply puts the data in to associative arrays. This worked on a couple of exported itunes plist files I tried.

use strict ;
use warnings;
use Math;

my $math_action = new Math();
my $number1 = 5;
my $number2 = 3;
my $results = $math_action->add($number1, $number2);
print $results;