performance - simple PHP script with sleep function not working, Browser prompt to download .php file -
when execute following php file (after time) browser ask download file
<?php ini_set("max_execution_time", 0); set_time_limit(0); for($i=0;$i<10;$i++){ echo time(); echo "<br>"; $sec=rand(15,30); sleep($sec); } ?>
in browser nothing echo
prompt download php file (if file take approximate 2 or more minute execute problem occurred)
thanks in advance.
if server decides throw php source code instead of running it, server setup messed up.
not sure how got messed because screenshot hints using xampp. in case, try reinstalling xampp.
Comments
Post a Comment