YP/NIS函式庫

yp_match

(PHP3 >= 3.0.7 , PHP4)

yp_match ---  傳回相配的行

語法 : string yp_match (string domain, string map, string key)

說明 : 

yp_match( )傳回自指定的地圖(map)離開的 key值或FALSE,這個 key必須是精確無誤的。

Example :

<?php

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

    echo "Matched entry is: " . $entry;

?>

這將會是 : joe:##joe:11111:100:Joe User:/home/j/joe:/usr/local/bin/bash

參考 : yp_get_default_domain( )


上一頁 首頁 下一頁