Jump to content

How do I set the buffer size?


bobleny

Recommended Posts

I am using ajax to get some data from the server, while the server loads the information, which could take a few minutes, the user just stairs at a loading sign until the server spews out the data all at once. What I would like to do is set the buffer size smaller, so that the server sends its data back as it is found. So the user can watch the list be populated.

 

I did find a function that might make it work the way I want it to, but I don't know how to use it.

I found this: HttpResponse::setBufferSize()

here: http://php.net/manual/en/function.httpresponse-setbuffersize.php

 

When I try to use it like a function I get this error:

Fatal error: Class 'HttpResponse' not found in ...test.php on line 2

 

test.php

<?php
HttpResponse::setBufferSize(200);
echo HttpResponse::getBufferSize();
?>

 

Could someone help me out please?

Link to comment
https://forums.phpfreaks.com/topic/203023-how-do-i-set-the-buffer-size/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.