Home  >  Article  >  Backend Development  >  PHP function library (other)

PHP function library (other)

PHP中文网
PHP中文网Original
2016-07-30 13:31:591285browse


  • session_cache_expire — Returns the expiration time of the current cache


session_cache_expire() returns the setting value of session.cache_expire.

When the request starts, the cache expiration time will be reset to 180 and stored in the session.cache_expire configuration item. Therefore, for each request, session_cache_expire() needs to be called before the session_start() function is called to set the cache expiration time. Parameters:

  • session_module_name — Get/set session module name

  • session_regenerate_id & mdash; Update existing session ID with newly generated session ID

  • session_save_path — Read/set the save path of the current session

  • session_set_save_handler — Set user-defined session storage function

  • PHP_SESSION_DISABLED if sessions are disabled.

  • PHP_SESSION_NONE if sessions are enabled, but none exists. session_unregister - Unregister a global variable from the current session

  • session_write_close — Write session data and end session

  • call_user_method_array — , while passing parameter array (deprecated)

call_user_method — Call a user method on a specific object (deprecated)

    class_alias — Create an alias for a class
  • class_exists

myclass
myfunc1
myfunc2

get_class_vars — Returns an array consisting of the default properties of the class

// Before PHP 4.2.0
var2 : xyz
var3 : 100

// As of PHP 4.2.0
var1 :
var2 : xyz
var3 : 100
string(3) "foo"
string(3) "bar"

get_declared_classes — Returned by Array of 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 If it belongs to this class or this class is the parent class of this object, it returns TRUE

property_exists - Check whether the object or class has this property

  • $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 Number */

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 related content, please pay attention to the PHP Chinese website (www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn