استفاده از محدودیت حداکثر زمان پاسخ و اجرا صفحات پی اچ پی php Setting Time Limits On PHP Scripts
6. Not Setting Time Limits On PHP Scripts
When PHP scripts run, it's assumed that they'll eventually finish in a timely manner. But every good programmer knows that nothing should be assumed in a piece of code. Nothing makes a program crankier than an unresponsive script.
You can get around this issue by simply setting a time limit on the script (set_time_limit). While it may seem like a trivial thing, it's always clever to prepare for the worst.
خب یه صفحه پی اچ پی حتما باید نهایتا تا یک زمان خاصی اجراش خاتمه پیدا بکنه و بیش از حد خاصی منتظر باقی نمونه به همین خاطر میتونین از تابع فوق به شکل زیر استفاده کنین :
کد PHP:
set_time_limit(20);
همچنین دو تابع زیر نیز میتونه در موارد مختلف مورد استفاده قرار بگیره
فقط اینکه هیچ کدام از این توابع در حالت safe mode کار نمیکنند .