【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-17.4-2.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
header('Content-Type: text/xml');
header("cache-control:no-cache,must-revalidate");
$xml="<?xml version='1.0' encoding='GB2312'?>";
$name=$_GET["names"];
if($name=="a"){
$data="<response><name>ai</name><name>
ajax</name><name>apple</name><name>an</name><name>aText</name></response>";
echo $
xml.$data;
}
if($name=="J")
{
$data="<response><name>Java</name><name>
JSP</name><name>
JavaScript</name><name>jar</name></response>";
echo $xml.$data;
}
if($name == "Y")
{
$data ="<response><name>Yound</name><name>Yound Tang</name><name>You</name><name>Yang</name></response>";
echo $xml.$data;
}
?>