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

PHP wfPHPVersionError函数代码示例

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

本文整理汇总了PHP中wfPHPVersionError函数的典型用法代码示例。如果您正苦于以下问题:PHP wfPHPVersionError函数的具体用法?PHP wfPHPVersionError怎么用?PHP wfPHPVersionError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wfPHPVersionError函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: wfEntryPointCheck

/**
 * Check php version and that external dependencies are installed, and
 * display an informative error if either condition is not satisfied.
 *
 * @note Since we can't rely on anything, the minimum PHP versions and MW current
 * version are hardcoded here
 */
function wfEntryPointCheck($entryPoint)
{
    $mwVersion = '1.29';
    $minimumVersionPHP = '5.5.9';
    $phpVersion = PHP_VERSION;
    if (!function_exists('version_compare') || version_compare($phpVersion, $minimumVersionPHP) < 0) {
        wfPHPVersionError($entryPoint, $mwVersion, $minimumVersionPHP, $phpVersion);
    }
    // @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
    if (!file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
        // @codingStandardsIgnoreEnd
        wfMissingVendorError($entryPoint, $mwVersion);
    }
    // List of functions and their associated PHP extension to check for
    // @codingStandardsIgnoreStart Generic.Arrays.DisallowLongArraySyntax
    $extensions = array('mb_substr' => 'mbstring', 'utf8_encode' => 'xml', 'ctype_digit' => 'ctype', 'json_decode' => 'json', 'iconv' => 'iconv');
    // List of extensions we're missing
    $missingExtensions = array();
    // @codingStandardsIgnoreEnd
    foreach ($extensions as $function => $extension) {
        if (!function_exists($function)) {
            $missingExtensions[] = $extension;
        }
    }
    if ($missingExtensions) {
        wfMissingExtensions($entryPoint, $mwVersion, $missingExtensions);
    }
}
开发者ID:paladox,项目名称:mediawiki,代码行数:35,代码来源:PHPVersionCheck.php


示例2: wfEntryPointCheck

/**
 * Check php version and that external dependencies are installed, and
 * display an informative error if either condition is not satisfied.
 *
 * @note Since we can't rely on anything, the minimum PHP versions and MW current
 * version are hardcoded here
 */
function wfEntryPointCheck($entryPoint)
{
    $mwVersion = '1.27';
    $minimumVersionPHP = '5.3.3';
    $phpVersion = PHP_VERSION;
    if (!function_exists('version_compare') || version_compare($phpVersion, $minimumVersionPHP) < 0) {
        wfPHPVersionError($entryPoint, $mwVersion, $minimumVersionPHP, $phpVersion);
    }
    if (!file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
        wfMissingVendorError($entryPoint, $mwVersion);
    }
}
开发者ID:rrameshs,项目名称:mediawiki,代码行数:19,代码来源:PHPVersionCheck.php


示例3: define

 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 */
// So extensions (and other code) can check whether they're running in API mode
define('MW_API', true);
// Bail if PHP is too low
if (!function_exists('version_compare') || version_compare(PHP_VERSION, '5.3.2') < 0) {
    // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
    require dirname(__FILE__) . '/includes/PHPVersionError.php';
    wfPHPVersionError('api.php');
}
require __DIR__ . '/includes/WebStart.php';
wfProfileIn('api.php');
$starttime = microtime(true);
// URL safety checks
if (!$wgRequest->checkUrlExtension()) {
    return;
}
// Verify that the API has not been disabled
if (!$wgEnableAPI) {
    header($_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500);
    echo 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php' . '<pre><b>$wgEnableAPI=true;</b></pre>';
    die(1);
}
// Set a dummy $wgTitle, because $wgTitle == null breaks various things
开发者ID:whysasse,项目名称:kmwiki,代码行数:31,代码来源:api.php


示例4: dirname

 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 * @ingroup Maintenance
 * @defgroup Maintenance Maintenance
 */
// Make sure we're on PHP5.3.2 or better
if (!function_exists('version_compare') || version_compare(PHP_VERSION, '5.3.2') < 0) {
    // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
    require_once dirname(__FILE__) . '/../includes/PHPVersionError.php';
    wfPHPVersionError('cli');
}
/**
 * @defgroup MaintenanceArchive Maintenance archives
 * @ingroup Maintenance
 */
// Define this so scripts can easily find doMaintenance.php
define('RUN_MAINTENANCE_IF_MAIN', __DIR__ . '/doMaintenance.php');
define('DO_MAINTENANCE', RUN_MAINTENANCE_IF_MAIN);
// original name, harmless
$maintClass = false;
/**
 * Abstract maintenance class for quickly writing and churning out
 * maintenance scripts with minimal effort. All that _must_ be defined
 * is the execute() method. See docs/maintenance.txt for more info
 * and a quick demo of how to use it.
开发者ID:nischayn22,项目名称:mediawiki-core,代码行数:31,代码来源:Maintenance.php


示例5: structures

 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 */
# Bail on old versions of PHP.  Pretty much every other file in the codebase
# has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in
# PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and
# 5.1, respectively.
if (!function_exists('version_compare') || version_compare(phpversion(), '5.3.2') < 0) {
    // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
    require dirname(__FILE__) . '/includes/PHPVersionError.php';
    wfPHPVersionError('index.php');
}
# Initialise common code.  This gives us access to GlobalFunctions, the
# AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and
# $wgContLang, amongst others; it does *not* load $wgTitle
require __DIR__ . '/includes/WebStart.php';
$mediaWiki = new MediaWiki();
$mediaWiki->run();
开发者ID:mangowi,项目名称:mediawiki,代码行数:31,代码来源:index.php


示例6: dirname

 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 * @author Roan Kattouw
 * @author Trevor Parscal
 *
 */

// Bail if PHP is too low
if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.2.3' ) < 0 ) {
	require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
	wfPHPVersionError( 'load.php' );
}

if ( isset( $_SERVER['MW_COMPILED'] ) ) {
	require ( 'phase3/includes/WebStart.php' );
} else {
	require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
}

// Construct a tag for newrelic -- wgRequest is global in this scope
if( function_exists( 'newrelic_name_transaction' ) ) {
	if ( function_exists( 'newrelic_disable_autorum') ) {
		newrelic_disable_autorum();
	}
	if (is_object($wgRequest)) {
		$sharedWiki = (preg_match("/^slot[0-9]\$/",$wgDBname) || $wgDBname == 'devbox') ? "shared" : "local";
开发者ID:schwarer2006,项目名称:wikia,代码行数:31,代码来源:load.php


示例7: dirname

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 */
// Bail if PHP is too low
if (!function_exists('version_compare') || version_compare(PHP_VERSION, '5.3.2') < 0) {
    // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
    require dirname(dirname(__FILE__)) . '/includes/PHPVersionError.php';
    wfPHPVersionError('mw-config/index.php');
}
define('MW_CONFIG_CALLBACK', 'Installer::overrideConfig');
define('MEDIAWIKI_INSTALL', true);
// Resolve relative to regular MediaWiki root
// instead of mw-config subdirectory.
chdir(dirname(__DIR__));
require dirname(__DIR__) . '/includes/WebStart.php';
wfInstallerMain();
function wfInstallerMain()
{
    global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames;
    $installer = InstallerOverrides::getWebInstaller($wgRequest);
    if (!$installer->startSession()) {
        if ($installer->request->getVal("css")) {
            // Do not display errors on css pages
开发者ID:whysasse,项目名称:kmwiki,代码行数:31,代码来源:index.php


示例8: wfEntryPointCheck

/**
 * Check php version and that external dependencies are installed, and
 * display an informative error if either condition is not satisfied.
 */
function wfEntryPointCheck($entryPoint)
{
    if (!function_exists('version_compare') || version_compare(PHP_VERSION, '5.3.3') < 0 || !file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
        wfPHPVersionError($entryPoint);
    }
}
开发者ID:D66Ha,项目名称:mediawiki,代码行数:10,代码来源:PHPVersionCheck.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wfPercent函数代码示例发布时间:2022-05-23
下一篇:
PHP wfOpenElement函数代码示例发布时间: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