In general, the topic is this: a table is formed from the MySQL database. The result is contained in a variable, which is an array.

Next you need to display all the xml file

//отправляю заголовки xml //........................... foreach($zzz as $k => $v) { echo $v; } 

The code above is, of course, more difficult every 100 times, but the essence is as follows.

Question: how can I give the file in parts? Or is it impossible?

Well, let's say we send a bunch of requests to the database and output them line by line - I call these parts because the memory is not loaded.

And how in this case can you unload the load ???

I hope you got what I meant.

  • Mine is another ekonomiya on matches. How much content can be given can weigh? - Alex Kapustin
  • You can flush after each echo, then the data from the buffer will be immediately given to the browser. [Here] ( hashcode.ru/questions/93191#93267 ) another way from @ Sh4dow - ReinRaus

2 answers 2

No problem at all. The browser receives data as the web server gives it away. The page is considered fully received only after closing the connection. Comet technology is based on this principle. But it is advisable to specify the page encoding, because otherwise the browser buffers the first 512 bytes in order to try to determine the encoding itself.

The web server itself can still buffer data, but there is usually a small buffer and if the goal is just to minimize the memory consumption in php, then you should not bother with it.

Yes, and echo is just like any other output method.

  • The connection is not closing ... - Alex Kapustin
  • And you can find out what exactly you, two or two, wanted to say? - Next_Alex

Strongly unlikely, at least not exactly echo )
Here another question will arise: where do you deliver it? If the user is in the browser, then no, the browser gets the finished page.
If somewhere else, then see sockets.