WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Forex Trading Online forex trading platform
Limits the maximum execution time

set_time_limit

(PHP 4, PHP 5)

set_time_limitLimits the maximum execution time

Description

void set_time_limit ( int $seconds )

Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini.

When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.

Parameters

seconds

The maximum execution time, in seconds. If set to zero, no time limit is imposed.

Return Values

No value is returned.

Notes

Warning

This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. This is not true on Windows where the measured time is real.


SQL_CALC_FOUND_ROWS - How to know the number of rows a query would have returned if there was no LIMIT set on the query using php5 and mysqli.Usfull with Pagination (Paging).
Categories : PHP, Databases, MySQL
'Random effect text' - This randomly select characters from a text string and changes the characters color for a short set time period.
Categories : Java Script
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Categories : PHP, Sessions, Databases, MySQL



a set of php scripts and html pages to access a consult database. consultDB currently supports: -mileage log -time tracking -extensible reports -easy editing
Categories : Databases, PHP
'Ripple effect text' - This sequentially changes the case and color for a short set time period for each character in a text string. It provides a simple 'Ripple' text effect.
Categories : Java Script
A simple function to get the UTC offset of your location. Handy for sites that don't have more recent versions of PHP with date/time functions with options that return the offset.
Categories : PHP, Date Time
Complex paging with no resultset limit
Categories : PHP, MySQL, Databases, Output Control, HTML and PHP
Year 2000 compliant 'localtime()' function for PHP.
Categories : PHP, Date Time
Limiting float typing
Categories : PHP
A set of functions sitting on top of the abstraction layer that makes it a little easier to do SQL stuff. Documentation is within
Categories : Databases, ODBC, Complete Programs, PHP
Simple router for framed pages. If you have frames and don't want people to view your documents without them, add this script into your document and the surfer will be redirected back to index.html if the document is opened without the frameset.
Categories : Java Script
A simple script to count and report hits and the last modification time of an HTML page. Requires MySQL support (other DBs should work too, except possibly mSQL).
Categories : HTTP
REALTIME SHIPPING QUOTE
Categories : Complete Programs, Ecommerce, PHP
HTML_Graphs uses PHP to provide a consistent interface for creating HTML based charts. The user of the class sets up arrays that are passed to html_graph() which then takes care of all the messy HTML layout.
Categories : Graphics, Arrays, PHP, PHP Classes, Charts and Graphs