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


PHP wfUtils::isNginx方法代碼示例

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


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

示例1: htaccess

 public static function htaccess()
 {
     if (is_readable(ABSPATH . '/.htaccess') && !wfUtils::isNginx()) {
         return file_get_contents(ABSPATH . '/.htaccess');
     }
     return "";
 }
開發者ID:VizualAbstract,項目名稱:Marilyn,代碼行數:7,代碼來源:wfUtils.php

示例2: ajax_checkFalconHtaccess_callback

 public static function ajax_checkFalconHtaccess_callback()
 {
     if (wfUtils::isNginx()) {
         return array('nginx' => 1);
     }
     $file = wfCache::getHtaccessPath();
     if (!$file) {
         return array('err' => "We could not find your .htaccess file to modify it.", 'code' => wfCache::getHtaccessCode());
     }
     $fh = @fopen($file, 'r+');
     if (!$fh) {
         $err = error_get_last();
         return array('err' => "We found your .htaccess file but could not open it for writing: " . $err['message'], 'code' => wfCache::getHtaccessCode());
     }
     return array('ok' => 1);
 }
開發者ID:ashenkar,項目名稱:sanga,代碼行數:16,代碼來源:wordfenceClass.php

示例3:

		<?php 
if (!wfUtils::isNginx()) {
    ?>
			<a href="#" onclick="WFAD.disableDirectoryListing('${id}'); return false;">Fix this issue</a>
		<?php 
}
?>
		<a href="#" onclick="WFAD.updateIssueStatus('${id}', 'delete'); return false;">I have fixed this issue</a>
		<a href="#" onclick="WFAD.updateIssueStatus('${id}', 'ignoreC'); return false;">Ignore this issue</a>
		{{/if}}
		{{if status == 'ignoreC' || status == 'ignoreP'}}
		<a href="#" onclick="WFAD.updateIssueStatus('${id}', 'delete'); return false;">Stop ignoring this issue</a>
		{{/if}}
	</div>
	<?php 
if (!wfUtils::isNginx()) {
    ?>
	{{if (status == 'new')}}
	<div class="wfIssueOptions">
		<strong style="width: auto;">Manual Fix:</strong>
		&nbsp;
		Add <code>Options -Indexes</code> to your .htaccess file.
	</div>
	{{/if}}
	<?php 
}
?>

</div>
</div>
</script>
開發者ID:ashenkar,項目名稱:sanga,代碼行數:31,代碼來源:menu_scan.php

示例4: htaccess

 public static function htaccess()
 {
     $htaccess = wfCache::getHtaccessPath();
     if (is_readable($htaccess) && !wfUtils::isNginx()) {
         return file_get_contents($htaccess);
     }
     return "";
 }
開發者ID:uwmadisoncals,項目名稱:Cluster-Plugins,代碼行數:8,代碼來源:wfUtils.php


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