本文整理汇总了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 "";
}