我想在这里使用 xml 解析从服务器获取数据我把我的 php 代码用于返回 xml 输出但是我如何使用 url 运行这个 php 函数并以 xml 格式显示我的 xmloutput
我的 php 服务在这里
<?php
include('configuration.php');
include('i_connection.php');
if(function_exists($_GET['f']))
{
$_GET['f']();
function getdata($xml_output)
{
$result = mysql_query("SELECT state FROM `pic_upload`");
$xml_output .="<photo>";
while($row = mysql_fetch_array($result))
{
$xml_output .="<photos>";
if($result['state'] != "")
$xml_output .="<State>".$result['state']."</State>";
else
$xml_output .="<State></State>";
$xml_output .="</photos>";
}
$xml_output .="</photo>";
return $xml_output;
}
}