php - Unresponsive script - Loop on big array -
i have lot of files ( more 120k ) , want read them in case add together content database. have processed php list main directory content , send result json javascript. in javascript showed result first when got error :
warning : unresponsive script script on page may busy, or may have stopped responding...
i can take between go on or stop script. here code :
$(document).ready(function(){ $.post("old.php", {aucunparam: 0}, function(data){ for(var file in data["files"]){ $("body").append(data["files"][file]+'<br>'); } }, "json"); });
how can process files , have real time @ processing ?
this not php problem. jquery problem.
try like:
$(document).ready(function(){ $.post("old.php", {aucunparam: 0}, function(data){ $("body").append(data["files"].join('<br>')); }, "json"); });
php jquery
No comments:
Post a Comment