PHP function library (other)

Source: Internet
Author: User
: This article mainly introduces the PHP function library (other). If you are interested in the PHP Tutorial, refer to it.
  • Session_cache_expire-return the expiration time of the current cache


Session_cache_expire () returnsSession. cache_expire.

When the request starts, the cache expiration time is reset to 180 and saved in the session. cache_expire configuration item. Therefore, for each request, you must call session_cache_expire () to set the cache expiration time before calling the session_start () function. Parameters:

  • Session_module_name-get/set session module name

  • Session_regenerate_id-update an existing session ID with the newly generated session ID

  • Session_save_path-read/set the save path of the current session

  • Session_set_save_handler-set the user-defined session storage function

  • PHP_SESSION_DISABLEDIf sessions are disabled.

  • PHP_SESSION_NONEIf sessions are enabled, but none exists.

  • PHP_SESSION_ACTIVEIf sessions are enabled, and one exists.

  • Session_unregister-Unregister a global variable from the current session

  • Session_write_close-Write session data and end session

  • Call_user_method_array-call a user method and pass the parameter array (obsolete)

  • Call_user_method-call the user method for a specific object (obsolete)

  • Class_alias-create an alias for a class

  • Class_exists-check whether the class is defined

myclassmyfunc1myfunc2

  • Get_class_vars-returns an array composed of the default attributes of the class.

// Before PHP 4.2.0var2 : xyzvar3 : 100// As of PHP 4.2.0var1 :var2 : xyzvar3 : 100

string(3) "foo"string(3) "bar"

  • Get_declared_classes-returns an array composed of the names of defined classes.

Array(    [0] => Traversable    [1] => IteratorAggregate    [2] => Iterator    [3] => ArrayAccess    [4] => reflector    [5] => RecursiveIterator    [6] => SeekableIterator)

  • Get_declared_traits-returns an array of all defined traits.

  • Is_a-if the object belongs to this class or the class is the parent class of this object, TRUE is returned.

  • Property_exists-check whether the object or class has this attribute

$ Link = mysql_connect ('localhost', 'MySQL _ user', 'MySQL _ password ');
If (! $ Link ){
Die ('could not connect: '. mysql_error ());
}
Mysql_select_db ('mydb ');
/* This example returns the exact number of deleted records */
Mysql_query ('delete FROM mytable WHERE id

Connected successfully

  • Mysql_connect-open a connection to the MySQL server

The above is the content of the PHP function library (other). For more information, see PHP Chinese Web (www.php1.cn )!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.