ibase_add_user
(PHP 5, PHP 7 < 7.4.0)
ibase_add_user — Add a user to a security database
说明
ibase_add_user(
resource
string
string
string
string
string
): bool
resource
$service_handle
,string
$user_name
,string
$password
,string
$first_name
= ?,string
$middle_name
= ?,string
$last_name
= ?): bool
参数
-
service_handle
-
The handle on the database server service.
-
user_name
-
The login name of the new database user.
-
password
-
The password of the new user.
-
first_name
-
The first name of the new database user.
-
middle_name
-
The middle name of the new database user.
-
last_name
-
The last name of the new database user.
返回值
成功时返回 true
, 或者在失败时返回 false
。
参见
- ibase_modify_user() - Modify a user to a security database
- ibase_delete_user() - Delete a user from a security database

User Contributed Notes 1 note
pabloj ¶
16 years ago
You can create users on Firebird/Interbase this way:
<?php
// attach to the server with proper privileges
if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
// get server version and implementation strings
$server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
. ' / '
. ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
//ibase_service_detach($service);
}
else {
$ib_error = ibase_errmsg();
}
echo $server_info;
//add a new user with name 'pippo' and password 'pp'
if (($result = ibase_add_user($service, 'pippo', 'pp')) != FALSE) {
echo 'User created';
ibase_service_detach($service);
}
else {
$ib_error = ibase_errmsg();
//detach from server
ibase_service_detach($service);
}
?>
备份地址:http://www.lvesu.com/blog/php/function.ibase-add-user.php