📄 03-ct_ldap.sgml
字号:
<!-- $Id: 03-ct_ldap.sgml,v 1.1.1.1 2000/04/17 16:40:01 kk Exp $ --><sect1>CT_Ldap<p>The <tt/Session/ class used to contain a bit of SQL to read andwrite session data from and to a database. To make sessionsdatabase independent, <tt/Session/ now makes all storageaccesses through a container class. To let <tt/Session/ use aLDAP database as a container, you use <tt/CT_Ldap/.<sect2>Instance variables<p><table><tabular ca="">ldap_host<colsep>This is the hostname of the LDAP server to connect to<rowsep>ldap_port<colsep>And this is its port (LDAP default is 389)<rowsep>basedn<colsep>This is the basedn<rowsep>rootdn<colsep>This is the rootdn which is required to modify the database<rowsep>rootpw<colsep>The respective password for rootdn<rowsep>objclass<colsep>The objectclass for PHPLIB's data<rowsep></tabular><caption>Accessible instance variables.</caption></table><sect2>Example<p>Use a subclass to provide the appropriate parameters to your container. Usually your subclass looks like this: <tscreen><code>class My_Ldap extends CT_Ldap { var $classname = "My_Ldap"; var $ldap_host = "localhost"; var $ldap_port = 389; var $basedn = "dc=your-domain, dc=com"; var $rootdn = "cn=root, dc=your-domain, dc=com"; var $rootpw = "secret"; var $objclass = "phplibdata";}</code></tscreen>You can then use My_Ldap in class Session. Reference itby putting "My_Ldap" in the "that_class" variable.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -