Fjern første linie
Jeg har et script som generere en xml fil.. men problemet er at i toppen er der en tom linie som gør at der ik kan læses fra xml filen fra andre steder..hvordan fjerner jeg den linie i mit php script!
PHP:
<code>
<?php
require('./includes/class.FreeBSD.inc.php');
require('./includes/common_functions.php');
require('./includes/formatted.php');
$sysinfo = new sysinfo;
$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
$xml .= "<phpsysinfo>\n";
$xml .= xml_Formatted();
$xml .= "</phpsysinfo>";
print $xml;
?>
</code>
Output XML
<code>
<-- den her linie skal væk!
<?xml version="1.0" encoding="iso-8859-1"?>
<phpsysinfo>
<Formatted>
<Item_0>2 hours 1 mins</Item_0>
<Item_1>0.00 0.00 0.00</Item_1>
<Item_2>35MB</Item_2>
<Item_3>123MB</Item_3>
<Item_4>0MB</Item_4>
<Item_5>240MB</Item_5>
</Formatted>
</phpsysinfo>
