Closed david-kristin closed 4 years ago
The services work with the XMLWriter to output a string by default. If you skip the Service class and work with Writer
directly, you can use openURI
on the writer instead to write directly to a stream.
This method should take php://output
as an argument I believe.
Thank you so much, evert. Otherwise I would be stuck on this one much longer.
I use the Service for writing XML, it look like this:
$this->service->write('rss', [ 'channel' => $channel, ])
The channel is composed of thousands of items, thus I am getting
Allowed memory size of 134217728 bytes exhausted (tried to allocate 171570808 bytes)
that is related to$w->outputMemory()
line.How can this be solved? Generally, the problem is writing a huge text.