I have 5000 rows in text file separated by new line like:
text1
text2
text3
..etc
I need take them one by one from this file as variables in my script, and then result add to file without overwrite last row.
If i trying to paste all array to form and make request like:
$List = preg_split("/\\r\\n|\\r|\\n/", $_REQUEST['text']);
foreach ($List as $text) {
echo (isset($_REQUEST['text']) ? '<pre>' .$exp->result.'</pre>' : $exp->result);
}
it work but wiht less than 100 rows, or server go down.
The questions are:
- How take each row from file one by one and make working function ?
- How to save the result to file one by one ?
- Why does the server overload with my example ?