小编mey*_*sam的帖子

调用未定义的函数__()错误 - phpMyAdmin

当我想在我的浏览器上运行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.

有什么想法解决问题吗?

php phpmyadmin

37
推荐指数
3
解决办法
4万
查看次数

覆盖yii2上模块的转换路径

假设我Foo使用composer 将模块安装在一个存储库中.模块结构如下:

- Foo
 |- models
 |- controllers
 |- views
 |- messages
 |- config
Run Code Online (Sandbox Code Playgroud)

MessagesFoo包含模块翻译文件的文件夹.现在我想覆盖一些翻译字符串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)

我如何实现目标?

php yii yii2

8
推荐指数
1
解决办法
1486
查看次数

+过载不需要两个功能吗?

我在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)

c++ operator-overloading

1
推荐指数
1
解决办法
65
查看次数

标签 统计

php ×2

c++ ×1

operator-overloading ×1

phpmyadmin ×1

yii ×1

yii2 ×1