1 $link=Mysqli_connect("localhost", "WU", "WP", "WDB");2 $sql= ' SET GLOBAL connect_timeout=2 ';3 Mysqli_query($link,$sql);4 5 Ini_set(' Memory_limit ', '-1 ');6 $sql= ' WW ';7 $WW=0;8 if($result=Mysqli_query($link,$sql)) {9 while($row=Mysqli_fetch_assoc($result)) {Ten Echo' <br> ',$WW,‘--‘. Time(); One $WW++; A } - Mysqli_free_result($result); - } the die();
1 $link=Mysqli_connect("localhost", "WU", "WP", "WDB");2 //$sql = ' SET GLOBAL connect_timeout=2 ';3 //mysqli_query ($link, $sql);4 5 Ini_set(' Memory_limit ', '-1 ');6 $sql= ' WW ';7 $WW=0;8 if($result=Mysqli_query($link,$sql)) {9 while($row=Mysqli_fetch_assoc($result)) {Ten Echo' <br> ',$WW,‘--‘. Time(); One $WW++; A } - Mysqli_free_result($result); - } the die();
SHOW VARIABLES like " %out% " ; set GLOBAL connect_timeout= 31536000 ; SHOW VARIABLES like " %out% " ; set GLOBAL connect_timeout= 2 ; SHOW VARIABLES like " %out% " ;
Navicat
' WW '
Control variable Method-Junior Physics-nobel Lecture, December, 1929-php perform set GLOBAL connect_timeout=2 effect