radius_put_string
(PECL radius >= 1.1.0)
radius_put_string — 문자열 속성을 첨부합니다.
설명
radius_put_string( resource $radius_handle, int $type, string $value, int $options = 0, int $tag = ? ): bool
현재 RADIUS 요청에 정수 속성을 연결합니다. 일반적으로 radius_put_attr()은 바이너리 안전하므로 문자열 속성을 첨부하는 데 더 유용한 함수입니다.
메모: 이 함수를 호출하려면 먼저 radius_create_request()를 통해 요청을 생성해야 합니다.
매개변수
radius_handle
- The RADIUS resource.
type
- The attribute type.
value
- 속성 값입니다. 이 값은 기본 라이브러리에서 null로 끝나는 것으로 예상되므로 이 매개변수는 바이너리 안전하지 않습니다.
options
- 속성 옵션의 비트마스크. 사용 가능한 옵션에는
RADIUS_OPTION_TAGGED
및RADIUS_OPTION_SALT
가 있습니다. tag
- 속성 태그.
RADIUS_OPTION_TAGGED
옵션이 설정되어 있지 않으면 이 매개변수는 무시됩니다.
반환 값
성공 시 true
을 반환하고 오류 시 false
를 반환합니다.
변경 로그
버전 | 설명 |
---|---|
PECL radius 1.3.0 | options 및 tag 매개 변수가 추가되었습니다. |
Examples
예제 #1 radius_put_string() 예제
<?php
if (!radius_put_string($res, RADIUS_USER_NAME, 'billy')) {
echo 'RadiusError:' . radius_strerror($res). "\n<br />";
exit;
}
?>
기타
- radius_put_int() - Attaches an integer attribute
- radius_put_vendor_int() - 공급업체별 정수 속성을 첨부합니다.
- radius_put_vendor_string() - 공급업체별 문자열 속성을 첨부합니다.