首页 > Web开发 > 详细

控制变量法-初中物理-Nobel Lecture, December 12, 1929-php执行SET GLOBAL connect_timeout=2效果

时间:2016-12-23 16:17:53      阅读:208      评论:0      收藏:0      [点我收藏+]

 

 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效果

原文:http://www.cnblogs.com/yuanjiangw/p/6215013.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!