radius_put_string - Attaches a string attribute
Вернуться к: Radius Функции
radius_put_string
(PECL radius >= 1.1.0)
radius_put_string — Attaches a string attribute
Описание
$radius_handle
, int $type
, string $value
[, int $options = 0
[, int $tag
]] )Attaches a string attribute to the current RADIUS request. In general, radius_put_attr() is a more useful function for attaching string attributes, as it is binary safe.
Замечание:
Перед вызовом данной функции необходимо создать запрос с помощью функции radius_create_request().
Список параметров
-
radius_handle -
Ресурс RADIUS.
-
type -
Тип атрибута.
-
value -
The attribute value. This value is expected by the underlying library to be null terminated, therefore this parameter is not binary safe.
-
options -
Битовая маска опций атрибута. В качестве значений можно использовать
RADIUS_OPTION_TAGGEDиRADIUS_OPTION_SALT. -
tag -
Тег атрибута. Данный параметр игнорируется, если не установлена опция
RADIUS_OPTION_TAGGED.
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Список изменений
| Версия | Описание |
|---|---|
| PECL radius 1.3.0 |
The options and tag
parameters were added.
|
Примеры
Пример #1 radius_put_string() example
<?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() - Attaches a vendor specific integer attribute
- radius_put_vendor_string() - Attaches a vendor specific string attribute
Вернуться к: Radius Функции