Changeset 10050


Ignore:
Timestamp:
2006/12/01 14:33:02 (15 years ago)
Author:
kakinaka
Message:

blank

Location:
temp/trunk/html
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/test/kakinaka/auth_http.php

    r10048 r10050  
    55require_once($include_dir . "/pear/Auth_HTTP.php"); 
    66 
     7define("DSN", "pgsql://kakinaka_db_user:password@kakinaka.ec-cube.net/kakinaka_db"); 
    78 
    8 define("DSN", "pgsql://kakinaka_db_user:password@kakinaka.ec-cube.net/kakinaka_db"); 
     9 
     10$params = Array(".htpasswd","authType"=>"basic","cryptType"=>"MD5"); 
     11 
     12$objAuth = new Auth_HTTP("File",$params); 
     13 
     14// realmÎΰè̾ 
     15$objAuth->setRealm('Please Enter Your Password'); 
     16 
     17// ǧ¾Ú¤ò¥­¥ã¥ó¥»¥ë¤äǧ¾Ú¥¨¥é¡¼¤·¤¿ºÝ¤Ëɽ¼¨¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸ 
     18$objAuth->setCancelText('<h2>Authorization Required</h2>'); 
     19 
     20// ǧ¾Ú¥×¥í¥»¥¹¤Î³«»Ï 
     21$objAuth->start(); 
     22 
     23if($objAuth->getAuth()) { 
     24    echo $objAuth->username . "¤Îǧ¾Ú¤ËÀ®¸ù!"; 
     25} 
    926 
    1027 
     
    2340sfprintr($AuthOptions); 
    2441 
    25  
    2642$a = new Auth_HTTP("DB", $AuthOptions); 
    27  
    2843 
    2944sfprintr($a); 
Note: See TracChangeset for help on using the changeset viewer.