• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wfMemoryLimit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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";
开发者ID:platform-project,项目名称:platform-project,代码行数:31,代码来源:Installer.php


示例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
开发者ID:paladox,项目名称:mediawiki,代码行数:31,代码来源:Setup.php



注:本文中的wfMemoryLimit函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wfMerge函数代码示例发布时间:2022-05-23
下一篇:
PHP wfMemcKey函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap