YP/NIS函式庫

yp_next

(PHP3 >= 3.0.7 , PHP4)

yp_next ---  傳回地圖中的下一個key-value

語法 : array yp_next (string domain, string map, string key)

說明 : 

yp_next( )傳回 map中在指定的 key之後的下一個 key-value對或FALSE。

Example :

<?php

    $entry = yp_next ($domain, "passwd.byname", "joe"); 

    if (!$entry) { 

            echo yp_errno() . ": " . yp_err_string(); 

    } 

    $key = key ($entry); 

    echo "The next entry after joe has key " . $key . " and value " . $entry[$key];

?>

參考 : yp_get_default_domain( )


上一頁 首頁