Answer the question
In order to leave comments, you need to log in
How to execute a PHP script without reloading the page?
<?php
$row = 1;
$handle = fopen("test.csv", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo "<p> $num полей в строке $row: ";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . " ";
}
}
fclose($handle);
?>
Answer the question
In order to leave comments, you need to log in
You probably don't understand the technology a little. The server receives the request, processes it, and returns a response. In your case, I would write a js code that sends an AJAX request at a frequency of, say, once every 10 seconds, receives a response and displays it on the screen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question