Dutch PHP Conference 2025 - Call For Papers

radius_put_string

(PECL radius >= 1.1.0)

radius_put_stringAttaches a string attribute

Опис

radius_put_string(
    resource $radius_handle,
    int $type,
    string $value,
    int $options = 0,
    int $tag = ?
): bool

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;
}
?>

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top