本文整理匯總了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 "";
}
示例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);
}
示例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>
Add <code>Options -Indexes</code> to your .htaccess file.
</div>
{{/if}}
<?php
}
?>
</div>
</div>
</script>
示例4: htaccess
public static function htaccess()
{
$htaccess = wfCache::getHtaccessPath();
if (is_readable($htaccess) && !wfUtils::isNginx()) {
return file_get_contents($htaccess);
}
return "";
}