当我想在我的浏览器上运行phpMyAdmin时,会显示以下错误:
Fatal error: Call to undefined function __() in /usr/share/phpMyAdmin/libraries/core.lib.php on line 229
Call Stack
# Time Memory Function Location
1 0.0010 344984 {main}( ) ../index.php:0
2 0.0026 502720 require_once( '/usr/share/phpMyAdmin/libraries/common.inc.php' ) ../index.php:12
3 0.0285 3836408 require( '/usr/share/phpMyAdmin/libraries/session.inc.php' ) ../common.inc.php:344
4 0.0288 3846488 PMA_fatalError( ) ../session.inc.php:97
Run Code Online (Sandbox Code Playgroud)
我使用Fedora 17和PHP 5.5.7.
有什么想法解决问题吗?
假设我Foo
使用composer 将模块安装在一个存储库中.模块结构如下:
- Foo
|- models
|- controllers
|- views
|- messages
|- config
Run Code Online (Sandbox Code Playgroud)
Messages
Foo
包含模块翻译文件的文件夹.现在我想覆盖一些翻译字符串Foo
.从Yii2 i18n文档我尝试在配置翻译组件时使用fileMap属性将bar
类别映射到bar.php
(而不是从中读取app\modules\Foo\messages
),但它对翻译没有任何影响.我的i18n组件配置是:
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
'fileMap' => [
'bar' => 'bar.php'
],
],
],
],
Run Code Online (Sandbox Code Playgroud)
我如何实现目标?
我在c ++上重载了+运算符,如下所示:
#include <iostream>
class Cent
{
private:
int m_nCent;
public:
Cent(){ };
Cent(int n);
int getCent() const;
void setCent(int);
friend Cent operator+(const Cent &c1, const Cent &c2);
friend Cent operator+(const Cent &c1, const int);
};
Cent::Cent(int n)
{
setCent(n);
}
int Cent::getCent() const
{
return Cent::m_nCent;
}
void Cent::setCent(int n)
{
Cent::m_nCent = n;
}
Cent operator+(const Cent &c1, const Cent &c2)
{
return Cent(c1.getCent() + c2.getCent());
}
Cent operator+(const Cent &c1, const int n)
{
return Cent(c1.getCent() + …
Run Code Online (Sandbox Code Playgroud)