Friday 19 October 2012

PHP ( TutorialsIV )


How can we increase the execution time of a php script

Default time allowed for the PHP scripts to execute is 30s defined in the php.ini file. The function used is set_time_limit(int seconds). If the value passed is ‘0’, it takes unlimited time. It should be noted that if the default timer is set to 30 sec and 20 sec is specified in set_time_limit(), the script will run for 45 secs.

How to set cookies in PHP 

Cookies are often used to track user information.

Cookies can be set in PHP using the setcookie() function.

Parameters are : name of the cookie, Value of cookie, time for expiry of cookie, path of the cookies location on server, domain, secure (TRUE or FALSE) indication whether the cookie is passed over a secure HTTPS, http only (TRUE) which will make the cookie accessible only through HTTP.

Returns TRUE or FALSE depending on whether the cookie was executed or not.


0 comments:

Post a Comment