- Posts: 54
- Thank you received: 2
Please Log in or Create an account to join the conversation.
Of course I am !If you are interested let me know
It is not easy : In fact, you must interrupt import process to return a reply indicating the progress status, then automatically (in background) call the import phase. This means you must be able to get bacj to import and restart where you stopped (not from beginning).Do you have a hint ?
Please Log in or Create an account to join the conversation.
babynus wrote:
It is not easy : In fact, you must interrupt import process to return a reply indicating the progress status, then automatically (in background) call the import phase. This means you must be able to get bacj to import and restart where you stopped (not from beginning).Do you have a hint ?
It is not an easy process to implement.
<?php
if (function_exists('register_shutdown_function'))
{
register_shutdown_function('ta_fonction');
}
else
{
ta_fonction();
}
// On affiche un pixel transparent
header('Content-length: 85');
header('Content-type: image/gif');
print base64_decode(
'R0lGODlhAQABALMAAAAAAIAAAACAA'.
'ICAAAAAgIAAgACAgMDAwICAgP8AAA'.
'D/AP//AAAA//8A/wD//wBiZCH5BAE'.
'AAA8ALAAAAAABAAEAAAQC8EUAOw=='
);
flush();
exit;
?>
Please Log in or Create an account to join the conversation.
<?php
/**
* Quick and easy progress script
* The script will slow iterate through an array and display progress as it goes.
*/
#First progress
$array1 = array(2, 4, 56, 3, 3);
$current = 0;
foreach ($array1 as $element) {
$current++;
outputProgress($current, count($array1));
}
echo "<br>";
#Second progress
$array2 = array(2, 4, 66, 54);
$current = 0;
foreach ($array2 as $element) {
$current++;
outputProgress($current, count($array2));
}
/**
* Output span with progress.
*
* @param $current integer Current progress out of total
* @param $total integer Total steps required to complete
*/
function outputProgress($current, $total) {
echo "<span style='position: absolute;z-index:$current;background:#FFF;'>" . round($current / $total * 100) . "% </span>";
myFlush();
sleep(1);
}
/**
* Flush output buffer
*/
function myFlush() {
echo(str_repeat(' ', 256));
if (@ob_get_contents()) {
@ob_end_flush();
}
flush();
}
?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
En poursuivant votre navigation, vous acceptez le dépôt de cookies tiers destinés au bon fonctionnement et à la sécurisation du site (gestion de session, reCaptcha) et à une analyse statistique anonymisée des accès sur notre site (Google Analytics). Si vous vous inscrivez, les informations que vous fournirez ne seront jamais divulguées à un tiers sous quelque forme que ce soit. En savoir plus
Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.
Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.