flush()
PHP flush() funksiyasi
❮ PHP Output Control ma’lumotnomasi
Misol
Skript ishini tugatishidan oldin brauzerga string chiqaring:
<?php
// Some browsers will not display the content if it is too short
// We use str_pad() to make the output long enough
echo str_pad("Hello World!", 4096);
// Use flush() to send the string to the browser
flush();
// Display the rest of the content three seconds later
sleep(3);
echo "<br>";
echo "Hello World!";
?>
O‘zingiz sinab ko‘ring »
Ta’rif va qo‘llanilishi
flush() funksiyasi serverdan hozirda buferda turgan natijani brauzerga yuborishni so‘raydi. Server konfiguratsiyasi bunga har doim ham ruxsat bermasligi mumkin.
Sintaksis
flush();
Texnik tafsilotlar
| PHP versiyasi: | 4+ |
|---|
❮ PHP Output Control ma’lumotnomasi
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
