本文整理汇总了PHP中wfMemoryLimit函数的典型用法代码示例。如果您正苦于以下问题:PHP wfMemoryLimit函数的具体用法?PHP wfMemoryLimit怎么用?PHP wfMemoryLimit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wfMemoryLimit函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: value
print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>)\n\t\tappears to be invalid or is not writable. PHP needs to be able to save data to\n\t\tthis location for correct session operation.</li>";
}
# Check for PCRE support
if (!function_exists('preg_match')) {
dieout("The PCRE support module appears to be missing. MediaWiki requires the\n\tPerl-compatible regular expression functions.");
}
# The installer can take a while, and we really don't want it to time out
wfSuppressWarnings();
set_time_limit(0);
wfRestoreWarnings();
$memlimit = ini_get("memory_limit");
if ($memlimit == -1) {
print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
} else {
print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars($memlimit) . " bytes. ";
$newlimit = wfMemoryLimit();
$memlimit = wfShorthandToInteger($memlimit);
if ($newlimit < $memlimit) {
print "<b>Failed raising limit, installation may fail.</b>";
} elseif ($newlimit > $memlimit) {
print "Raised <tt>memory_limit</tt> to " . htmlspecialchars($newlimit) . " bytes. ";
}
print "</li>\n";
}
$conf->xcache = function_exists('xcache_get');
if ($conf->xcache) {
print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
}
$conf->apc = function_exists('apc_fetch');
if ($conf->apc) {
print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>\n";
示例2: wfMemoryLimit
}
// We don't use counters anymore. Left here for extensions still
// expecting this to exist. Should be removed sometime 1.26 or later.
if (!isset($wgDisableCounters)) {
$wgDisableCounters = true;
}
if ($wgMainWANCache === false) {
// Setup a WAN cache from $wgMainCacheType with no relayer.
// Sites using multiple datacenters can configure a relayer.
$wgMainWANCache = 'mediawiki-main-default';
$wgWANObjectCaches[$wgMainWANCache] = ['class' => 'WANObjectCache', 'cacheId' => $wgMainCacheType, 'channels' => ['purge' => 'wancache-main-default-purge']];
}
Profiler::instance()->scopedProfileOut($ps_default2);
$ps_misc = Profiler::instance()->scopedProfileIn($fname . '-misc1');
// Raise the memory limit if it's too low
wfMemoryLimit();
/**
* Set up the timezone, suppressing the pseudo-security warning in PHP 5.1+
* that happens whenever you use a date function without the timezone being
* explicitly set. Inspired by phpMyAdmin's treatment of the problem.
*/
if (is_null($wgLocaltimezone)) {
MediaWiki\suppressWarnings();
$wgLocaltimezone = date_default_timezone_get();
MediaWiki\restoreWarnings();
}
date_default_timezone_set($wgLocaltimezone);
if (is_null($wgLocalTZoffset)) {
$wgLocalTZoffset = date('Z') / 60;
}
// The part after the System| is ignored, but rest of MW fills it