dongzi1209 2015-08-11 23:06
浏览 81
已采纳

如何修复:致命错误:我的localhost上的区域设置'en_AU.UTF-8'

Im encountering issues with php development (im new into this language)

I have setup a local copy of the development files for our project. However, when im trying to view it on my localhost it shows me this error

Fatal error: Locale 'en_AU.UTF-8' is not available in C:\xampp\htdocs\[projectname]\bootstrap.php on line 46

this is the code on bootstrap.php on line 46

define('LOCALE',   'en_AU.UTF-8');
define('TIMEZONE', 'Australia/Perth');

    if ( !setlocale(LC_ALL, LOCALE) ) {
  trigger_error("Locale '" . LOCALE . "' is not available", E_USER_ERROR);
}

function __dump_debug() {
  global $composer_loader;
  echo "<!-- DEBUG INFORMATION AT " . date('c') . "
";
  print_r([
    'APP_ROOT'     => APP_ROOT,
    'PHP_ENV'      => PHP_ENV,
    'TMP_DIR'      => TMP_DIR,
    'LOG_DIR'      => LOG_DIR,
    'LOCALE'       => setlocale(LC_ALL, 0),
    'TIMEZONE'     => date_default_timezone_get(),
    'USER'         => rollbar_get_current_user(),
    'SQL'          => [
      'VARIABLES' => mysqlGetPairs('SHOW SESSION VARIABLES')
    ],
    'INCLUDE_PATH' => get_include_path(),
    'CLASSES'      => get_declared_classes(),
    'COMPOSER'     => [
      'CLASSMAP' => $composer_loader->getClassMap(),
      'PREFIXES' => $composer_loader->getPrefixes(),
    ],
    'INFLECTOR'    => [
      'ACRONYMS' => ICanBoogie\Inflector::get()->inflections->acronyms
    ]
  ]);
  echo "-->";
}

how do I fix this error? any inputs will be greatly appreciated.

Thanks!

  • 写回答

1条回答 默认 最新

  • duandaishi9268 2015-08-11 23:37
    关注

    You will need to enable PHP's INTL extension.

    You should find everything you need for XAMPP here.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算