ray Mon Dec 9 15:25:54 2002 EDT Modified files: /phpdoc/en/reference/ldap/functions ldap-bind.xml Log: Fixed examples to coding standards. Index: phpdoc/en/reference/ldap/functions/ldap-bind.xml diff -u phpdoc/en/reference/ldap/functions/ldap-bind.xml:1.4 phpdoc/en/reference/ldap/functions/ldap-bind.xml:1.5 --- phpdoc/en/reference/ldap/functions/ldap-bind.xml:1.4 Mon Dec 9 12:22:39 2002 +++ phpdoc/en/reference/ldap/functions/ldap-bind.xml Mon Dec 9 15:25:54 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/ldap.xml, last change in rev 1.2 --> <refentry id="function.ldap-bind"> <refnamediv> @@ -34,19 +34,20 @@ $ldappass = 'password'; // associated password // connect to ldap server -$ldapconn = ldap_connect( "ldap.example.com" ) - or die( "Could not connect to LDAP server." ); +$ldapconn = ldap_connect("ldap.example.com") + or die("Could not connect to LDAP server."); + +if ($ldapconn) { -if( $ldapconn ) -{ // binding to ldap server - $ldapbind = ldap_bind( $ldapconn, $ldaprdn, $ldappass ); + $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // verify binding - if( $ldapbind ) + if ($ldapbind) { echo "LDAP bind successful..."; - else + } else { echo "LDAP bind failed..."; + } } @@ -63,18 +64,19 @@ //using ldap bind anonymously // connect to ldap server -$ldapconn = ldap_connect( "ldap.example.com" ) - or die( "Could not connect to LDAP server." ); +$ldapconn = ldap_connect("ldap.example.com") + or die("Could not connect to LDAP server."); + +if ($ldapconn) { -if( $ldapconn ) -{ // binding anonymously - $ldapbind = ldap_bind( $ldapconn ); + $ldapbind = ldap_bind($ldapconn); - if( $ldapbind ) + if ($ldapbind) { echo "LDAP bind anonymous successful..."; - else + } else { echo "LDAP bind anonymous failed..."; + } }
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php