我在FLASH 里生成了这个 XML.toString();
<theXML>
<index theName="my Name is 0" indexId="0" />
<index theName="my Name is 1" indexId="1" />
<index theName="my Name is 2" indexId="2" />
<index theName="my Name is 3" indexId="3" />
<index theName="my Name is 4" indexId="4" />
</theXML>
在PHP里:
<?PHP
$XML = stripslashes($_POST['XML']);
$root = simplexml_load_string($XML);
echo "&reply=$root->index->Attribute('indexId')";
?>
请问我哪里用错了? 出来的结果是 index-> attribute('indexId'); 没这个 “ ” 的话就Error。
Fatal error: Call to a member function Attribute() on a non-object in C:\xampp\htdocs\eims\flashXML.php on line 11
[ 本帖最后由 宅男-兜着走 于 2009-7-7 03:52 PM 编辑 ]




