首页 > 代码库 > 控制变量法-初中物理-Nobel Lecture, December 12, 1929-php执行SET GLOBAL connect_timeout=2效果
控制变量法-初中物理-Nobel Lecture, December 12, 1929-php执行SET GLOBAL connect_timeout=2效果
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)) { 10 echo ‘<br>‘,$ww,‘--‘.time(); 11 $ww++; 12 } 13 mysqli_free_result($result); 14 } 15 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)) { 10 echo ‘<br>‘,$ww,‘--‘.time(); 11 $ww++; 12 } 13 mysqli_free_result($result); 14 } 15 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‘
控制变量法-初中物理-Nobel Lecture, December 12, 1929-php执行SET GLOBAL connect_timeout=2效果
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。