运行外部程序system卡死的问题

#1 凌风


system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
?>
当运行这一段的时候不停的按F5刷新时,仍是运行正常的。
define("APP_PATH",dirname(__FILE__));
define("SP_PATH", APP_PATH.'/libs/sp');
$spConfig = array(
'mode' => 'release', // 应用程序模式,默认为调试模式'mode' => 'de ', // 调试模式 'mode' => 'release', // 部署模式
'sp_cache' => APP_PATH.'/home/tmp', // 框架临时文件夹目录
'controller_path' => APP_PATH.'/home/system', // 用户控制器程序的路径定义
'model_path' => APP_PATH.'/home/model', // 用户模型程序的路径定义
'sp_notice_php' => SP_PATH."/Misc/notice.php", // 框架默认的错误提示程序
'view' => array( // 视图配置
  'enabled' => TRUE, // 开启视图
  'config' =>array(
   'template_dir' => APP_PATH.'/home/tpl', // 模板目录
   'compile_dir' => APP_PATH.'/tmp/home', // 编译目录
   'cache_dir' => APP_PATH.'/tmp/home', // 缓存目录
   'left_delimiter' => '{',  // smarty左限定符
   'right_delimiter' => '}', // smarty右限定符
  ),
  'de ging' => FALSE, // 是否开启视图调试功能,在部署模式下无法开启视图调试功能
  'auto_ob_start' => FALSE, // 是否自动开启缓存输出控制
  'auto_display' => FALSE, // 是否使用自动输出模板功能
  'auto_display_sep' => '/', // 自动输出模板的拼装模式,/为按目录方式拼装,_为按下划线方式,以此类推
  'auto_display_suffix' => '.html', // 自动输出模板的后缀名
),

'url' => array( // URL设置
  'url_path_info' => true, // 是否使用path_info方式的URL
  'url_path_base' =>'', // URL的根目录访问地址,默认为空则是入口文件index.php
),

'include_path' => array(
  APP_PATH.'/libs',
), // 用户程序扩展类载入路径
);
require(SP_PATH."/SpeedPHP.php");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
system("dir");
?>
当加载了这一段后,按F5不停的刷新,apache就直接当机了

环境 win apache2.2 php5 mysql5

这样的后果导致在做服务器程序的时候,用户点击量大直接导致当机。

2011-09-30 14:33:21

#2 jake

程序的作用不同,没什么可比性。你这个测试方法,什么框架什么程序都会卡死的。

2011-09-30 16:18:55

#3 lkmtdgt

楼主采用刷屏方式,把死人都能被你正活了:lol

2011-10-12 23:53:26