Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php return loading message

<?php
// Disable buffering
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('output_buffering', 'Off');
@ini_set('implicit_flush', 1);
// Flush buffers
ob_implicit_flush(1);
for ($i = 0, $level = ob_get_level(); $i < $level; $i++) ob_end_flush();
?><!DOCTYPE html>
<html>
<head>
  <title>Loading</title>
</head>
<body>
  <div id="loading">LOADING</div>
<?php
// We need to send enough junk messages to make it works for all browsers
echo str_repeat(" ", 1024), "
";

ob_start();
// Long process starts here
// For this example, just sleep for 5 seconds
sleep(5); 
echo "Loaded";
// Flush output like this
ob_flush();
flush();
?>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel simplexmlelement xml add attribute 
Php :: get the charectors inside braces regex php 
Php :: laravel create table with model command line 
Php :: laravel get path to storage folder 
Php :: mobile number validation in laravel 8 
Php :: laravel sidebar menu active 
Php :: php uuid generator 
Php :: laravel get query in normal sql without bindings 
Php :: install php-fpm centos 7 
Php :: composer deploy production 
Php :: php unique string 
Php :: get image size php 
Php :: redirect to site php 
Php :: laravel get input from request 
Php :: if button is clicked php 
Php :: required field in laravel admin 
Php :: object to string php 
Php :: php reader read date from excel 
Php :: mysql server has gone away php 
Php :: php convert special characters to unicode 
Php :: last 6 digits of string laravel 
Php :: php artisan migrate not working 
Php :: php remove 1 day from date 
Php :: default null migration laravel 
Php :: Allowed memory size of 1610612736 bytes exhausted 
Php :: laravel blade auth user 
Php :: php konstanten 
Php :: wordpress wp_enqueue_script footer 
Php :: Numbers Formater Decimal & Thousand Separator PHP 
Php :: Call to undefined method IlluminateSessionStore::set() 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =