php show loading message code example
Example: php return loading message
<?php
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('output_buffering', 'Off');
@ini_set('implicit_flush', 1);
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
echo str_repeat(" ", 1024), "\n";
ob_start();
sleep(5);
echo "Loaded";
ob_flush();
flush();
?>
</body>
</html>