運行時配置

這些函數(shù)的行為受 php.ini 中的設(shè)置影響。

Unified ODBC Configuration Options
名字 默認 可修改范圍 更新日志
odbc.default_db * NULL PHP_INI_ALL  
odbc.default_user * NULL PHP_INI_ALL  
odbc.default_pw * NULL PHP_INI_ALL  
odbc.allow_persistent "1" PHP_INI_SYSTEM  
odbc.check_persistent "1" PHP_INI_SYSTEM  
odbc.max_persistent "-1" PHP_INI_SYSTEM  
odbc.max_links "-1" PHP_INI_SYSTEM  
odbc.defaultlrl "4096" PHP_INI_ALL  
odbc.defaultbinmode "1" PHP_INI_ALL  
odbc.default_cursortype "3" PHP_INI_ALL  

注意: Entries marked with * are not implemented yet.

有關(guān) PHP_INI_* 樣式的更多詳情與定義,見 配置可被設(shè)定范圍。

這是配置指令的簡短說明。

odbc.default_db string

ODBC data source to use if none is specified in odbc_connect() or odbc_pconnect().

odbc.default_user string

User name to use if none is specified in odbc_connect() or odbc_pconnect().

odbc.default_pw string

Password to use if none is specified in odbc_connect() or odbc_pconnect().

odbc.allow_persistent bool

Whether to allow persistent ODBC connections.

odbc.check_persistent bool

Check that a connection is still valid before reuse.

odbc.max_persistent int

The maximum number of persistent ODBC connections per process.

The maximum number of ODBC connections per process, including persistent connections.

odbc.defaultlrl int

Handling of LONG fields. Specifies the number of bytes returned to variables. See odbc_longreadlen() for details.

當使用 int 時, 其值以字節(jié)來衡量。還可以使用在FAQ中描述的速記符。
odbc.defaultbinmode int

Handling 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).