Home  >  Article  >  Backend Development  >  PHP Chinese function serialization (1)_PHP tutorial

PHP Chinese function serialization (1)_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:00:23851browse

Function Abs()

Description:

mixed abs (mixed number);

Returns the absolute value of number. If the argument number is float, return type is also float, otherwise it is int (returns the absolute value of the entered number, floating point type returns floating point type, otherwise returns integer type)

Function Acos()

Description:

float acos (float arg);

Returns the arc cosine of arg in radians (returns the cosine of the angle)
Adabas D Function
Function ada_afetch()
Description:
fetch a result row into an array(return the result into an array)
Function ada_autocommit()
Description:
toggle autocommit behavior

Function ada_close()
Description:
close a connection to an Adabas D server (close a database connection)

Function ada_commit()
Description:
commit a transaction (submit a transaction)

Function ada_connect()
Description:
connect to an Adabas D datasource(connect a database)
Function ada_exec()
Description:
prepare and execute a SQL statement(execute a SQL statement)
Function ada_fetchrow()
Description:
fetch a row from a result(fetch a record from the database)

Function ada_fieldname()
Description:
get the columnname(get field name)
Function ada_fieldnum()
Description:
get column number (get the total number of fields)

Function ada_fieldtype()
Description:
get the datatype of a field(get the type of field)

Function ada_freeresult()
Description:
free resources associated with a result

Function ada_numfields()
Description:
get the number of columns in a result(get the number of fields in the result)

Function ada_numrows()
Description:
number of rows in a result(number of records in the result taken)

Function ada_result()
Description:
get data from results(get the result data)

Function ada_resultall()
Description:
print result as HTML table(output the result in HTML format)

Function ada_rollback()
Description:
rollback a transaction

Function apache_lookup_uri()
Description:
Perform a partial request for the specified URI and return all info about it, This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource and returns this information in a class. The properties of the returned classes are:

status: the_request, status_line, method, content_type, handler
uri: filename, path_info, args, boundary, no_cache, no_local_copy, allowed, send_bodyct, bytes_sent, byterange, clength, unparsed_uri mtime, request_time

Function apache_note()
Description:
Get and set apache request notes,apache_note() is an Apache-specific function which gets and sets values ​​in a request's notes table. If called with one argument, it returns the current value of note note_name . If called with two arguments, it sets the value of note note_name to note_value and returns the previous value of note note_name .

Function getallheaders()
Description:
Fetch all HTTP request headers(Get all HTTP header requests)
Example:
$headers = getallheaders();
while (list($header, $value) = each($headers)) {
echo "$header: $value
";
}
This example will display all recent header requests returned.
Note: This function only supports PHP under APACHE is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header.

Function virtual()
Description:
virtual()

ArrayFunction example

Function array()
Description:
Create an array
array array(...) returns an array of values, which can be appended with =>.
The following explains how to construct a two-dimensional array, how to specify the key of this array, and how to specify the value of the array in skip order in a normal array.
Example 1. array()

$fruits = array(
"fruits" => array("a"=>"orange","b"=>"banana","c"=>"apple"),
"numbers" => array(1, 2, 3, 4, 5, 6),
"holes" => array("first", 5 => "second", "third")
);

Function array_walk()
Description:
Use the function to process each element of the array
int array_walk (array arr, string func);
Use a function called FUNC to process each element of ARR. Those elements will be treated as parameters first passed to FUNC; if FUNC requires more than one parameter, FUNC will be called every time array_walk() All generate a warning message. These warning messages can be eliminated by adding the '@' symbol before array_walk()
.
Note: FUNC will directly process the elements in ARR, so changes to any element will directly change its value in the array.
Example 1. array_walk() example

$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
function test_alter( $item1 ) { $item1 = 'bogus'; }
function test_print($item2) { echo "$item2
"; }
array_walk( $fruits, 'test_print' );
array_walk( $fruits, 'test_alter' );
array_walk( $fruits, 'test_print' );

Function arsort()
Description:
Arrange an array in reverse order without changing its ordinal

void arsort (array array);

This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. Example 1. arsort()


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445530.htmlTechArticleFunction Abs() Description: mixed abs (mixed number); Returns the absolute value of number. If the argument number is float, return type is also float, otherwise it is int(returns the number lost...
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