Có thể đặt thời gian thực hiện tối đa là exec($command)
không? Đôi khi thực hiện $command
của tôi kéo dài quá lâu dừng lại sau 1 phút và trình bày báo lỗi này:Đặt thời gian thực thi tối đa cho exec() cụ thể
Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\files.php on line 51
Làm thế nào tôi có thể làm tăng exec()
lệnh thời gian thực hiện tối đa?
if (allow()) {
exec($command);
if (file_exists($file)) {
//exec($makeflv);
echo '<script language="javascript" type="text/javascript">window.top.window.aviout(1);</script>';
} else {
echo $error;
}
} else {
echo $error;
}
Btw, điều này đã được trả lời ít nhất ba lần: http://stackoverflow.com/questions/1176497/limit-execution-time-of-an-function-or-command-php, http://stackoverflow.com/questions/1928249/php-preventing-max- thời gian thực thi-giới hạn-cho-mail và http://stackoverflow.com/questions/21 47567/tránh-php-thực hiện-thời gian giới hạn – Gordon