Set maximum execution time in MYSQL / PHP

前端 未结 5 1531
名媛妹妹
名媛妹妹 2020-12-03 12:18

I have an XML document that has around 48,000 children (~50MB). I run an INSERT MYSQL query that makes new entries for each one of these children. The problem is that it tak

5条回答
  •  攒了一身酷
    2020-12-03 12:45

    You can Set maximum execution time in MYSQL / PHP. it's so easy.

    To set maximum execution time in single PHP file, place this code just after your first opening php tag.

    ini_set(‘max_execution_time’, 0)
    

    To set maximum execution time in php.ini file. You can set as per your require.

    max_execution_time=360 //360 seconds = 6 minutes
    

    To set maximum execution time in htaccess file.

    php_value max_execution_time 0
    

    You can also read step by step here.

提交回复
热议问题