From 01c3cad9c906938824679401cae850858796d26b Mon Sep 17 00:00:00 2001 From: Egon Schmid Date: Tue, 1 Feb 2000 21:26:38 +0000 Subject: [PATCH] Two functions doesn't exist. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@19072 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/nis.xml | 180 ++++++++++++++++++++++++---------------------- 1 file changed, 94 insertions(+), 86 deletions(-) diff --git a/functions/nis.xml b/functions/nis.xml index e2fba3c84a..e36c43dc6c 100644 --- a/functions/nis.xml +++ b/functions/nis.xml @@ -6,13 +6,14 @@ NIS (formerly called Yellow Pages) allows network management of important administrative files (e.g. the password file). For more - information refer to the NIS manpage and - Introduction to YP/NIS. There is also a book called Managing - NFS and NIS by Hal Stern. - + information refer to the NIS manpage and + Introduction to YP/NIS. There is also a book called Managing NFS and NIS by Hal Stern. + To get these functions to work, you have to configure PHP with - . + . + @@ -26,37 +27,34 @@ int yp_get_default_domain void - yp_get_default_domain returns the default domain of the node or FALSE. Can be used as the domain parameter - for successive NIS calls. - + for successive NIS calls. + A NIS domain can be described a group of NIS maps. Every host that needs to look up information binds itself to a certain domain. Refer to the documents mentioned at the beginning for - more detailed information. - + more detailed information. + Example for the default domain <?php $domain = yp_get_default_domain(); - - if(!$domain) { - echo yp_errno() . ": " . yp_err_string(); - } - echo "Default NIS domain is: " . $domain; ?> - - + + + @@ -72,30 +70,28 @@ string domain string map - yp_order returns the order number for a map - or FALSE. - + or FALSE. + Example for the NIS order <?php $number = yp_order($domain,$mapname); - - if(!$number) { - echo yp_errno() . ": " . yp_err_string(); - } - echo "Order number for this map is: " . $order; ?> - - + + - See also: - yp_get_default_domain yp_errno and yp_err_string + See also yp-get-default-domain. + + @@ -114,30 +110,29 @@ yp_master returns the machine name of - the master NIS server for a map. + the master NIS server for a map. + Example for the NIS master <?php $number = yp_master($domain, $mapname); - - if(!$number) { - echo yp_errno() . ": " . yp_err_string(); - } - echo "Master for this map is: " . $master; ?> - - + + - See also: - yp_get_default_domain yp_errno and yp_err_string - + See also yp-get-default-domain. + + + - yp_match @@ -161,27 +156,25 @@ <?php $entry = yp_match($domain, "passwd.byname", "joe"); - - if(!$entry) { - echo yp_errno() . ": " . yp_err_string(); - } - echo "Matched entry is: " . $entry; ?> - - + + In this case this could be: joe:##joe:11111:100:Joe - User:/home/j/joe:/usr/local/bin/bash - + User:/home/j/joe:/usr/local/bin/bash + - See also: - yp_get_default_domain yp_errno and yp_err_string - + See also yp-get-default-domain + + - + yp_first @@ -195,33 +188,30 @@ string domain string map - yp_first returns the first key-value - pair from the named map in the named domain, otherwise FALSE. - + pair from the named map in the named domain, otherwise FALSE. + Example for the NIS first <?php $entry = yp_first($domain, "passwd.byname"); - - if(!$entry) { - echo yp_errno() . ": " . yp_err_string(); - } - $key = key($entry); echo "First entry in this map has key " . $key . " and value " . $entry[$key]; ?> - - + + - See also: - yp_get_default_domain yp_errno and yp_err_string - + See also yp-get-default-domain + + @@ -241,8 +231,8 @@ yp_next returns the next key-value pair in - the named map after the specified key or FALSE. - + the named map after the specified key or FALSE. + Example for NIS next @@ -260,13 +250,19 @@ . " and value " . $entry[$key]; ?> - - + + - See also: - yp_get_default_domain, yp_errno and yp_err_string + See also yp-get-default-domain. + + + + + + +