Answer the question
In order to leave comments, you need to log in
How to upload a large XML file to a database?
Good day everyone.
There is a rather large xml file, approximately 50,000 lines will work out. I receive by choosing from a computer
$data = new \SimpleXMLElement($request->file('feed'), null, true);
foreach ($data as $item) {
$information = new Data([
'type' => $item->type,
...............
...............
]);
$information->save();
}
[Mon Mar 18 22:49:55.049174 2019] [cgi:error] [pid 27832] (70008)Partial results are valid but processing is incomplete: [client 37.115.231.73:37864] AH01225: Error reading request entity data, referer: https://vkohan.tk/feed/create?id=1
Answer the question
In order to leave comments, you need to log in
Just break the xml file into several xml's in notepad, and add one at a time to several execution passes. One script execution to load one piece of xml
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question