當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BasicAuth::entire_site_protected_message方法代碼示例

本文整理匯總了PHP中BasicAuth::entire_site_protected_message方法的典型用法代碼示例。如果您正苦於以下問題:PHP BasicAuth::entire_site_protected_message方法的具體用法?PHP BasicAuth::entire_site_protected_message怎麽用?PHP BasicAuth::entire_site_protected_message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BasicAuth的用法示例。


在下文中一共展示了BasicAuth::entire_site_protected_message方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 /**
  * Enable protection of the entire site with basic authentication.
  * 
  * This log-in uses the Member database for authentication, but doesn't interfere with the
  * regular log-in form. This can be useful for test sites, where you want to hide the site
  * away from prying eyes, but still be able to test the regular log-in features of the site.
  * 
  * If you are including conf/ConfigureFromEnv.php in your _config.php file, you can also enable
  * this feature by adding this line to your _ss_environment.php:
  * 
  * define('SS_USE_BASIC_AUTH', true);
  * 
  * @param boolean $protect Set this to false to disable protection.
  * @param String $code {@link Permission} code that is required from the user.
  *  Defaults to "ADMIN". Set to NULL to just require a valid login, regardless
  *  of the permission codes a user has.
  */
 static function protect_entire_site($protect = true, $code = 'ADMIN', $message = null)
 {
     self::$entire_site_protected = $protect;
     self::$entire_site_protected_code = $code;
     if ($message) {
         self::$entire_site_protected_message = $message;
     }
 }
開發者ID:prostart,項目名稱:cobblestonepath,代碼行數:25,代碼來源:BasicAuth.php


注:本文中的BasicAuth::entire_site_protected_message方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。