백엔드 개발 PHP 튜토리얼 PHP中文函数_PHP

PHP中文函数_PHP

Jun 01, 2016 pm 12:38 PM
array is the 중국인 기능

函数Abs()

描述:

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(返回所输的数字的绝对值,浮点型返回浮点型,其他返回整型)

函数Acos()

描述:

float acos (float arg);

Returns the arc cosine of arg in radians(返回角的余弦值)
Adabas D功能
函数ada_afetch()
描述:
fetch a result row into an array(返回结果到一个数组里)
函数ada_autocommit()
描述:
toggle autocommit behaviour

函数ada_close()
描述:
close a connection to an Adabas D server (关掉一个数据库的关联)

函数ada_commit()
描述:
commit a transaction (提交一个处理)

函数ada_connect()
描述:
connect to an Adabas D datasource(联接一个数据库)
函数ada_exec()
描述:
prepare and execute a SQL statement(执行一个SQL语句)
函数ada_fetchrow()
描述:
fetch a row from a result(从数据库中取一条记录)

函数ada_fieldname()
描述:
get the columnname(得到字段名)
函数ada_fieldnum()
描述:
get column number(得到字段的总数)

函数ada_fieldtype()
描述:
get the datatype of a field(取得字段的类型)

函数ada_freeresult()
描述:
free resources associated with a result

函数ada_numfields()
描述:
get the number of columns in a result(在结果中得到字段数目)

函数ada_numrows()
描述:
number of rows in a result(所取结果的记录数)

函数ada_result()
描述:
get data from results(得到结果的数据)

函数ada_resultall()
描述:
print result as HTML table(以HTML的格式输出结果)

函数ada_rollback()
描述:
rollback a transaction

函数apache_lookup_uri()
描述:
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 class 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

函数apache_note()
描述:
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 .

函数getallheaders()
描述:
Fetch all HTTP request headers(取得所有HTTP头部请求)
例子:
$headers = getallheaders();
while (list($header, $value) = each($headers)) {
echo "$header: $value
\n";
}
这个例子将显示返回所有最近的头部请求。
注:此函数只支持APACHE下的PHP 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.

函数virtual()
描述:
virtual()

数组函数 example

函数array()
描述:
建立一个数组
array array(...)传回一数组的值,这些值可以用=>来附值。
下面说明了如何构建一个二维数组,及如何指定这个数组的key,以及在正常的数组中以跳序的方式去指定数组的值。
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")
);

函数array_walk()
描述:
函数的方式对每个数组的元素做处理
int array_walk (array arr, string func);
使用一个叫FUNC的函数对ARR的每个元素做处理,那些元素将当成是首传给FUNC的参数;如果FUNC需要超过一个参数,则在每次array_walk()呼叫FUNC时都产生一个警告信息,这些警告信息是可以消除的,只要把'@'符号加在array_walk()
之前即可。
注意:FUNC会直接对ARR中的元素做处理,所以任何元素的变化将直接改变其在数组中的值。
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
\n"; }
array_walk( $fruits, 'test_print' );
array_walk( $fruits, 'test_alter' );
array_walk( $fruits, 'test_print' );

函数arsort()
描述:
以倒序的方式排列一数组但其序数则不变

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() example

$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
arsort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
echo "fruits[$key] = ".$fruits[$key]."\n";
}

This example would display: fruits[a] = orange fruits[d] = lemon fruits[b] = banana fruits[c] = apple The fruits have been sorted in reverse alphabetical order, and the index associated with each element has been maintained.

函数asort()
描述:
顺序排列一数组且其序数不变

void asort (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. asort() example

$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
asort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
echo "fruits[$key] = ".$fruits[$key]."\n";
}


This example would display: fruits[c] = apple fruits[b] = banana fruits[d] = lemon fruits[a] = orange The fruits have been sorted in alphabetical order, and the index associated with each element has been maintained.

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Nordhold : Fusion System, 설명
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

golang 함수에서 새 함수를 동적으로 생성하기 위한 팁 golang 함수에서 새 함수를 동적으로 생성하기 위한 팁 Apr 25, 2024 pm 02:39 PM

Go 언어는 클로저와 리플렉션이라는 두 가지 동적 함수 생성 기술을 제공합니다. 클로저는 클로저 범위 내의 변수에 대한 액세스를 허용하며 리플렉션은 FuncOf 함수를 사용하여 새 함수를 생성할 수 있습니다. 이러한 기술은 HTTP 라우터를 사용자 정의하고 고도로 사용자 정의 가능한 시스템을 구현하며 플러그 가능한 구성 요소를 구축하는 데 유용합니다.

C++ 함수 이름 지정 시 매개변수 순서에 대한 고려 사항 C++ 함수 이름 지정 시 매개변수 순서에 대한 고려 사항 Apr 24, 2024 pm 04:21 PM

C++ 함수 이름 지정에서는 가독성을 높이고 오류를 줄이며 리팩토링을 용이하게 하기 위해 매개변수 순서를 고려하는 것이 중요합니다. 일반적인 매개변수 순서 규칙에는 작업-객체, 개체-작업, 의미론적 의미 및 표준 라이브러리 준수가 포함됩니다. 최적의 순서는 함수의 목적, 매개변수 유형, 잠재적인 혼동 및 언어 규칙에 따라 달라집니다.

Excel 함수 수식의 전체 모음 Excel 함수 수식의 전체 모음 May 07, 2024 pm 12:04 PM

1. SUM 함수는 열이나 셀 그룹의 숫자를 합하는 데 사용됩니다(예: =SUM(A1:J10)). 2. AVERAGE 함수는 열이나 셀 그룹에 있는 숫자의 평균을 계산하는 데 사용됩니다(예: =AVERAGE(A1:A10)). 3. COUNT 함수, 열이나 셀 그룹의 숫자나 텍스트 수를 세는 데 사용됩니다. 예: =COUNT(A1:A10) 4. IF 함수, 지정된 조건을 기반으로 논리적 판단을 내리고 결과를 반환하는 데 사용됩니다. 해당 결과.

C++ 함수 기본 매개변수와 가변 매개변수의 장단점 비교 C++ 함수 기본 매개변수와 가변 매개변수의 장단점 비교 Apr 21, 2024 am 10:21 AM

C++ 함수에서 기본 매개변수의 장점에는 호출 단순화, 가독성 향상, 오류 방지 등이 있습니다. 단점은 제한된 유연성과 명명 제한입니다. 가변 매개변수의 장점에는 무제한의 유연성과 동적 바인딩이 포함됩니다. 단점은 더 큰 복잡성, 암시적 유형 변환 및 디버깅의 어려움을 포함합니다.

참조 유형을 반환하는 C++ 함수의 이점은 무엇입니까? 참조 유형을 반환하는 C++ 함수의 이점은 무엇입니까? Apr 20, 2024 pm 09:12 PM

C++에서 참조 유형을 반환하는 함수의 이점은 다음과 같습니다. 성능 개선: 참조로 전달하면 객체 복사가 방지되므로 메모리와 시간이 절약됩니다. 직접 수정: 호출자는 반환된 참조 객체를 다시 할당하지 않고 직접 수정할 수 있습니다. 코드 단순성: 참조로 전달하면 코드가 단순화되고 추가 할당 작업이 필요하지 않습니다.

Java로 효율적이고 유지 관리 가능한 함수를 작성하는 방법은 무엇입니까? Java로 효율적이고 유지 관리 가능한 함수를 작성하는 방법은 무엇입니까? Apr 24, 2024 am 11:33 AM

효율적이고 유지 관리 가능한 Java 함수를 작성하는 핵심은 단순함을 유지하는 것입니다. 의미 있는 이름을 사용하세요. 특별한 상황을 처리합니다. 적절한 가시성을 사용하십시오.

C++ 함수 예외 고급: 사용자 정의된 오류 처리 C++ 함수 예외 고급: 사용자 정의된 오류 처리 May 01, 2024 pm 06:39 PM

C++의 예외 처리는 특정 오류 메시지, 상황별 정보를 제공하고 오류 유형에 따라 사용자 지정 작업을 수행하는 사용자 지정 예외 클래스를 통해 향상될 수 있습니다. 특정 오류 정보를 제공하려면 std::Exception에서 상속된 예외 클래스를 정의하세요. 사용자 정의 예외를 발생시키려면 throw 키워드를 사용하십시오. try-catch 블록에서 Dynamic_cast를 사용하여 발견된 예외를 사용자 지정 예외 유형으로 변환합니다. 실제 경우 open_file 함수는 FileNotFoundException 예외를 발생시킵니다. 예외를 포착하고 처리하면 보다 구체적인 오류 메시지가 제공될 수 있습니다.

사용자 정의 PHP 함수와 사전 정의된 함수의 차이점은 무엇입니까? 사용자 정의 PHP 함수와 사전 정의된 함수의 차이점은 무엇입니까? Apr 22, 2024 pm 02:21 PM

사용자 정의 PHP 함수와 사전 정의된 함수의 차이점은 다음과 같습니다. 범위: 사용자 정의 함수는 정의 범위로 제한되는 반면, 사전 정의된 함수는 스크립트 전체에서 액세스할 수 있습니다. 정의 방법: 사용자 정의 함수는 function 키워드를 사용하여 정의되는 반면, 사전 정의된 함수는 PHP 커널에 의해 정의됩니다. 매개변수 전달: 사용자 정의 함수는 매개변수를 수신하지만 사전 정의된 함수에는 매개변수가 필요하지 않을 수 있습니다. 확장성: 필요에 따라 사용자 정의 함수를 생성할 수 있으며 사전 정의된 함수는 내장되어 있어 수정할 수 없습니다.

See all articles