-1
我有一個PHP從一長串URL中獲取XML數據。看起來這是覆蓋xml.log文件,我怎樣才能將它附加到文件呢?PHP asXML寫入(追加)到文件
<?php
include("connect.php");
$query = "SELECT * FROM urls_list";
$result = mysqli_query($conn, $query) or die("MySQL Error..." . mysqli_error($conn));
while ($row = mysqli_fetch_array($result))
{
$url = $row['url'];
$xml = simplexml_load_file($url);
echo $xml->asXML('xml.log');
}
?>