这些函数的行为受 php.ini 中的设置影响。
名字 | 默认 | 可修改范围 | 更新日志 |
---|---|---|---|
odbc.default_db * | NULL | INI_ALL | |
odbc.default_user * | NULL | INI_ALL | |
odbc.default_pw * | NULL | INI_ALL | |
odbc.allow_persistent | "1" | INI_SYSTEM | |
odbc.check_persistent | "1" | INI_SYSTEM | |
odbc.max_persistent | "-1" | INI_SYSTEM | |
odbc.max_links | "-1" | INI_SYSTEM | |
odbc.defaultlrl | "4096" | INI_ALL | |
odbc.defaultbinmode | "1" | INI_ALL | |
odbc.default_cursortype | "3" | INI_ALL |
有关 INI_* 样式的更多详情与定义,见 配置可被设定范围。注意: Entries marked with * are not implemented yet.
这是配置指令的简短说明。
odbc.default_db
stringODBC data source to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.default_user
stringUser name to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.default_pw
stringPassword to use if none is specified in odbc_connect() or odbc_pconnect().
odbc.allow_persistent
boolWhether to allow persistent ODBC connections.
odbc.check_persistent
boolCheck that a connection is still valid before reuse.
odbc.max_persistent
intThe maximum number of persistent ODBC connections per process.
odbc.max_links
intThe maximum number of ODBC connections per process, including persistent connections.
odbc.defaultlrl
intHandling of LONG fields. Specifies the number of bytes returned to variables. See odbc_longreadlen() for details.
当使用 int 时, 其值以字节来衡量。还可以使用在 FAQ 中描述的速记符。odbc.defaultbinmode
intHandling of binary data. See odbc_binmode() for details.
odbc.default_cursortype
int Controls the ODBC cursor model. Possible values are SQL_CURSOR_FORWARD_ONLY
, SQL_CURSOR_KEYSET_DRIVEN
, SQL_CURSOR_DYNAMIC
and SQL_CURSOR_STATIC
(default).