<html><body>
<?php

// Writing to files with w+ mode

$t1 = "X X1,10,11";
$t2 = "Z Z1,20,21";

@ $f = fopen('/home/abu-jeib/temp/a.txt','w+');
if (!$f)
{
	echo "ERROR: file can't be opened.<P>\n";
	exit;
}
else
{
	// Read two lines
	$s = fgets($f);
	$s = fgets($f);

	// Write two lines
	fwrite($f,$t1."\n");
	fwrite($f,$t2."\n");
	fclose($f);
}

?>
</body></html>
