cubrid_connect
string$host,
int$port,
string$dbname,
[string$userid],
[string$passwd],
[bool$new_link = false]
): resource
The cubrid_connect function is used to establish the environment for connecting to your server by using your server address, port number, database name, user name, and password. If the user name and password is not given, then the "PUBLIC" connection will be made by default.
Parameters
- host
Host name or IP address of CUBRID CAS server.
- port
Port number of CUBRID CAS server (BROKER_PORT configured in $CUBRID/conf/cubrid_broker.conf).
- dbname
Name of database.
- userid
User name for the database. If not given, the default value is "public".
- passwd
User password. If not given, the default value is "".
- new_link
If a second call is made to cubrid_connect with the same arguments, no new connection will be established, but instead, the connection identifier of the already opened connection will be returned. The new_link parameter modifies this behavior and makes cubrid_connect always open a new connection, even if cubrid_connect was called before with the same parameters.
Return Values
Connection identifier, when process is successful, or false on failure.