- Timestamp:
- 2006/12/01 14:33:02 (20 years ago)
- Location:
- temp/trunk/html
- Files:
-
- 2 edited
-
.htaccess (modified) (previous)
-
test/kakinaka/auth_http.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/test/kakinaka/auth_http.php
r10048 r10050 5 5 require_once($include_dir . "/pear/Auth_HTTP.php"); 6 6 7 define("DSN", "pgsql://kakinaka_db_user:[email protected]/kakinaka_db"); 7 8 8 define("DSN", "pgsql://kakinaka_db_user:[email protected]/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 23 if($objAuth->getAuth()) { 24 echo $objAuth->username . "¤Îǧ¾Ú¤ËÀ®¸ù!"; 25 } 9 26 10 27 … … 23 40 sfprintr($AuthOptions); 24 41 25 26 42 $a = new Auth_HTTP("DB", $AuthOptions); 27 28 43 29 44 sfprintr($a);
Note: See TracChangeset
for help on using the changeset viewer.
