関数 wp_check_php_mysql_versions() 完了
2014/11/28
MySQLの環境をチェックする関数を定義
定義ファイル :/blog/wp-includes/load.php
呼出元 : /blog/wp-settings.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /** * Check for the required PHP version, and the MySQL extension or * a database drop-in. * * Dies if requirements are not met. * * @since 3.0.0 * @access private * * @global string $required_php_version The required PHP version string. * @global string $wp_version The WordPress version string. */ function wp_check_php_mysql_versions() { global $required_php_version, $wp_version; |
グローバル宣言
変数
$required_php_version
$wp_version
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $php_version = phpversion(); if ( version_compare( $required_php_version, $php_version, '>' ) ) { wp_load_translations_early(); header( 'Content-Type: text/html; charset=utf-8' ); die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); } if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { wp_load_translations_early(); header( 'Content-Type: text/html; charset=utf-8' ); die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); } } |
関数
phpversion()
version_compare()
翻訳ファイル読込(辞書)
wp_load_translations_early();
翻訳実行
__( 【translate()】
sprintf()
ヘッダ出力
header()