Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Friday, October 7, 2022

Writing 10 Million rows to a text file using PHP

how you can create a text file with 10 million rows in that using PHP.
This example is shown in a XAMPP server.
Below given code will create the file.


<?php
header("Content-Type: text/plain");
header('Content-Disposition: attachement; filename="jinujawad.txt"');

for ($x = 0; $x <= 1000000; $x++) {
echo "The number is: $x \n";
}
?>Hello honeyvig.com
this is text file
created from
browser

 

No comments:

Post a Comment