zf1315

zf1315

努力学习yii2,为社会做贡献

  • 财富值275
  • 威望值20
  • 总积分535

个人信息

  • 2014-12-27 已签到
    连续签到4天,获得了20个金钱
  • 我用的是ubuntu13.10,在安装完毕sphinxsearch后,在/etc/sphinxsearch/下有个sphinx.conf配置文件(注:不要问我关于windows下如何配置sphinx)

    searchd
    {
            # [hostname:]port[:protocol], or /unix/socket/path to listen on
            # known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL)
            #
            # multi-value, multiple listen points are allowed
            # optional, defaults are 9312:sphinx and 9306:mysql41, as below
            #
            # listen                        = 127.0.0.1
            # listen                        = 192.168.0.1:9312
            # listen                        = 9312
            # listen                        = /var/run/searchd.sock
            listen                  = 9312
            listen                  = 9306:mysql41
            # log file, searchd run info is logged here
            # optional, default is 'searchd.log'
            log                     = /var/log/sphinxsearch/searchd.log
            # query log file, all search queries are logged here
            # optional, default is empty (do not log queries)
    }
    
  • 回复了 的说说
    在这个里面是不是只能写关于yii的东西,那我如果写ubuntu的资料,不知道行不行
    @╃巡洋艦㊣: 我怎么发表一个技术分享,点保存,就跳到404页面?
  • 2014-12-26 已签到
    连续签到3天,获得了15个金钱
  • 回复了 的评论

    不知为何 编辑器中写入html代码 保存后 html 标记就不会显示,而是作为了 页面的部分。

    其实 只需要设置 'format'=>'html',在 return处将 html 代码当字符串返回即可。

    @infozr: 码农一般见了代码也疯狂,虽然本性很懒,呵呵

  • 回复了 的评论

    不知为何 编辑器中写入html代码 保存后 html 标记就不会显示,而是作为了 页面的部分。

    其实 只需要设置 'format'=>'html',在 return处将 html 代码当字符串返回即可。

    @╃巡洋艦㊣: 支持,我同意自己手写markdown。

  • 回复了 的回答

    不妨用用我写的这个
    https://github.com/liucunzhou/yii2-ueditor

    是不是composer.json.bak没有用呀

  • 发表了说说
    在这个里面是不是只能写关于yii的东西,那我如果写ubuntu的资料,不知道行不行
  • 回复了 的回答

    在composer.json中的require中添加:"yiisoft/yii2-sphinx": "*"
    然后在配置文件中添加该插件:

    return [
        //....
        'components' => [
            'sphinx' => [
                'class' => 'yii\sphinx\Connection',
                'dsn' => 'mysql:host=127.0.0.1;port=9306;',
                'username' => '',
                'password' => '',
            ],
        ],
    ];
    

    使用的时候,举个例子如下:

    $sql = 'SELECT * FROM idx_item WHERE group_id = :group_id';
    $params = [
        'group_id' => 17
    ];
    $rows = Yii::$app->sphinx->createCommand($sql, $params)->queryAll();
    

    @xing18c: 在sphinx的配置文件中配置呀

  • 在composer.json中的require中添加:"yiisoft/yii2-sphinx": "*"
    然后在配置文件中添加该插件:

    return [
        //....
        'components' => [
            'sphinx' => [
                'class' => 'yii\sphinx\Connection',
                'dsn' => 'mysql:host=127.0.0.1;port=9306;',
                'username' => '',
                'password' => '',
            ],
        ],
    ];
    

    使用的时候,举个例子如下:

    $sql = 'SELECT * FROM idx_item WHERE group_id = :group_id';
    $params = [
        'group_id' => 17
    ];
    $rows = Yii::$app->sphinx->createCommand($sql, $params)->queryAll();
    
主管 等级规则
535/1000
资料完整度
70/100
用户活跃度
0/100

Ta的关注

3

Ta的粉丝

2

Ta的访客

8