PHP tập tin (ví dụ, my_lengthy_script.php)
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
tập tin .htaccess
<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>
Nhiều tùy chọn cấu hình
Nếu wordpress, thiết lập này trong file config.php,
define('WP_MEMORY_LIMIT', '128M');
Nếu drupal, các trang web/default/settings.php
ini_set('memory_limit', '128M');
Nếu bạn đang sử dụng các khuôn khổ khác,
ini_set('memory_limit', '128M');
Bạn có thể tăng bộ nhớ là gigabyte.
ini_set('memory_limit', '3G'); // 3 Gigabytes
259200 có nghĩa là: -
(259200/(60x60 minutes))/24 hours ===> 3 Days
More details on my blog
Nguồn
2013-01-12 05:53:17
Bạn có trên một máy chủ chia sẻ? – Mob
Có, i m trên máy chủ chia sẻ – Bajrang