Adding data to table from txt file

I did something what writes data to a txt file. Now I want to display the data in the table dhtmlx. I do not know how to do this so please help.

    <span class="syntaxdefault"><?php
    $d = date('Y-m-d H:i:s')."Log on:\r\n";
    $file = "log.txt";
    $fp = fopen($file, "a");
    flock($fp, 2);
    fwrite($fp, $d);
    flock($fp, 3);
    echo "empty" ;

Open the file, read line by line and send lines to the Browser.

Yes, but I’m interested in how to do display data from txt file in the table dhtmlx. I know how to do it pulling from the database mysql, but I do not know how to txt file. I ask for some tutorial or how to do it. Thank you

Ok, step by step.
The request must come from the browser to your server. If it you open your file in PHP, read it and convert the read datas in XML, CSV or JSON format. After this send the datas to your browser.

How to init the grid, load and display the datas you can find a lot of examples here: … earandload

Ok I’ve done by help. But my data does not load the xml file.

<div id="gridbox" style="width:503px;height:120px;background-color:white;"></div>

mygrid = new dhtmlXGridObject('gridbox');
mygrid.setHeader("Name,Date of Birth, First Book Published");

<?xml version="1.0" encoding="UTF-8"?>
	<row id="1">
		<cell>John Grisham</cell>
	<row id="2">
		<cell>Stephen King</cell>
	<row id="3" selected="1">
		<cell>John Grisham</cell>

My errors:
Description: Incorrect cell type: dhxCalendar
Description: Incorrect cell type: dhxCalendarA
Error type: LoadXML
Description: Incorrect XML

Please check … mon_errors

Did you include all needed DHTMLX javascript files (in correct order)?

I checked and everything just as it is written there.But all time this same errors
Error type: LoadXML
Description: Incorrect XML

	<link rel="stylesheet" type="text/css" href="dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxgrid.css" />
	<link rel="stylesheet" type="text/css" href="dhtmlxGrid/dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css" />
	<script src="dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxcommon.js" type="text/javascript"></script>
	<script src="dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxgrid.js" type="text/javascript"></script>
	<script src="dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxgridcell.js" type="text/javascript"></script>
	<script src="dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxcontainer.js" type="text/javascript"></script>

Unfortunately the issue cannot be reconstructed locally.
Please provide a complete demo or demo link where the issue can be reconstructed