1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer''''s Dictionary- P52 pptx

5 257 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 416,68 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

session_id Syntax session_id[id]; Description The session_id function returns the session ID for the current session as a string.. session_register Syntax session_registername,[...]

Trang 1

The session_save_path() function returns the path of the directory that session data is currently being saved If the path is specified, the session data storage will

be changed to path

session_id()

Syntax

session_id([id]);

Description

The session_id() function returns the session ID for the current session as a string

If id is specified, it will replace the current session ID with that value

session_register()

Syntax

session_register(name,[ ]);

Description

The session_register() function registers variables with the current session This function accepts a variable number of parameters and returns true, 1, if the session variable is successfully registered The parameters can be a string holding the variable name, an array containing variable names, or arrays themselves For each variable name sent to session_register() as a parameter, a global variable is created in the current session

session_unregister()

Syntax

session_unregister(name);

Description

The session_unregister() function unregisters the variable defined by name from the current session This function returns true, 1, if the variable is successfully unregistered from the session

Trang 2

session_is_registered()

Syntax

session_is_registered(name);

Description

The session_is_registered() function returns true, 1, if the variable name is registered with the current session

session_decode()

Syntax

session_decode(data);

Description

The session_decode() function decodes the string defined by data into variables and inserts these variables into the current session

session_encode()

Syntax

session_encode();

Description

The session_encode() function returns an encoded string containing all current session data and associated variables

URL

This section deals with functions that encode, decode, or parse URL data This is often used when submitting forms to CGI programs or passing variables from a URL

to a program

base64_decode()

Trang 3

Syntax

base64_decode(encoded_data);

Description

The base64_decode() function decodes a string defined by encoded_data and returns the original data as a string

base64_encode()

Syntax

base64_encode(data);

Description

The base64_encode() function encodes the string defined by data and returns the data as a string in base64 encoding This encoded string is designed to minimize the corruption of raw binary data Because of error checking, the encoded string is approximately 33% larger than the original data Base64 encoding is described in RFC-2045 Table 7.6 illustrates the encoding that occurs

Table 7.6 Base64 Conversions

Val Encod Val Encod Val Encod Val Encod

Trang 4

parse_url()

Syntax

parse_url(url);

Description

The parse_url() function returns an associative array containing the components of the url The array will contain one or all of the following elements:

• scheme

• host

• port

• user

• pass

• path

• query

• fragment

urldecode()

Syntax

urldecode(str);

Description

The urldecode() function converts str from URL-encoded format into plain text This places any nonalphanumeric characters, encoded with a percent sign (%) followed by the two-digit hexadecimal ASCII value of the character, back to their character representations Plus signs are converted to spaces

urlencode()

Syntax

urlencode(str);

Trang 5

Description

The urlencode() function returns a string that has been converted from plain text to URL format This conversion replaces any nonalphanumeric characters with a percent sign (%) followed by the two-digit hexadecimal ASCII value of the character Spaces are converted to plus (+) signs

VMailMgr

VMailMgr (Virtual Mail Manager) is an assortment of programs designed to manage multiple email domains and mailboxes on a single host VMailMgr operates in conjunction with the qmail application qmail is a sendmail alternative that offers more options and program control than sendmail

The following functions build on the established VMailMgr and qmail functionality For this reason, VMailMgr and qmail must be installed for these functions to work

Resource

The qmail application and information are available at http://www.qmail.org

The VMailMgr application and information are available at http://www.vmailmgr.org

vm_adduser()

Syntax

vm_adduser(vdomain, basepwd, newusername, newuserpassword);

Description

The vm_adduser() function adds a new virtual user with newusername and

newuserpassword to vdomain The vdomain parameter is defined as the domain

name of the user's virtual domain The string basepwd is the password of the master user that administers the virtual users

This function returns the following:

• O—Okay

• 1—Bad

• 2—Error

Ngày đăng: 07/07/2014, 05:20