पीएचपी फ्लश () समारोह
❮ पीएचपी आउटपुट नियंत्रण कार्य
उदाहरण
स्क्रिप्ट के चलने से पहले ब्राउज़र में एक स्ट्रिंग आउटपुट करें:
<?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!";
?>
परिभाषा और उपयोग
flush()
फ़ंक्शन सर्वर से ब्राउज़र को वर्तमान में बफ़र किए गए आउटपुट को भेजने का अनुरोध करता है । सर्वर कॉन्फ़िगरेशन हमेशा ऐसा होने की अनुमति नहीं दे सकता है।
वाक्य - विन्यास
flush();
टेक्निकल डिटेल
पीएचपी संस्करण: | 4+ |
---|
❮ पीएचपी आउटपुट नियंत्रण कार्य