我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在Yii应用程序中设置全局区域设置

What it the correct way to set the global PHP locale in a Yii application?

I've managed to find that locale is set in PHP with setlocale() function. But where should I put its call to be applicable for the entire Yii Web application?

Note that I want to set the same specific PHP locale for all parts of my application.

You can set from index.php

In our apps we define APPLICATION_ENV in index.php and use it anywhere..

define("APPLICATION_ENV", "production");

近期文章

  • 需要用户名/密码才能执行PHP脚本
  • 致命错误:调用未定义的函数displayStep1()
  • 隐藏未登录php / mysql的用户的链接
  • 使用PHP将数据传递到可执行文件
  • 将数组从PHP转换为C#
  • 如何在MySQL程序中返回最后插入的id
  • 使用reg.exp检测URL
  • PHP获取当前输入值和新提交的值
  • 我的php变量导致mailchimp api错误
  • PHP time()函数返回epoch而不是当前时间
  • JPGraph + mysql数组没有读取值
  • 使用先前值填充下拉列表,同时删除所选值
  • XML解析 - 无法检索节点的值
  • LIMIT替代品
  • CakePHP保存具有类似数据的模型
  • 使用PDO / PHP获取数据和循环[关闭]
  • 无法将PHP数组传递给jquery:JSON数据后出现意外的非空白字符
  • 如何在PHP中绘制图形? [关闭]
  • 确定值是否在表中的最有效方法
  • 无法在无脂肪框架3中创建分页

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华