這裏是我的代碼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