这里是我的代码PHP不会回显XML孩子
<form method="post">
<input name="hash" type="text" id="hash" style='width: 30%;'/>
<input name="Crack!" type="submit" value="Crack!" onfocus="if(this.blur)this.blur()"/>
</form>
<?php
if(isset($_POST['Crack!'])){
$hash = $_POST['hash'];
$xml = simplexml_load_file("http://gdataonline.com/qkhash.php?mode=xml&hash=$hash");
$status = $xml->data->status;
if ($status = "Success"){
$plain = $xml->data->result;
}elseif ($status = "Hash not found"){
$plain = "Not Found"; }
?>
<table>
<tr>
<td><?php echo "gdataonline.com: "; ?></td>
<td><?php echo "$plain"; ?></td>
</tr>
</table>
<?php
echo "<pre>";
var_dump($xml);
echo "</pre>";
} //if submit
?>
出于某种原因,我无法得到它的回声$平原,在所有。就好像它甚至无法读取它一样。
是的,你的代码是:-) – streetparade 2010-02-04 20:42:39
非常感谢!像魅力一样工作! – Rob 2010-02-04 20:54:19