Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何指定ip? #3

Open
MariaWf opened this issue Jan 22, 2018 · 1 comment
Open

如何指定ip? #3

MariaWf opened this issue Jan 22, 2018 · 1 comment

Comments

@MariaWf
Copy link

MariaWf commented Jan 22, 2018

在xunsearch 组件的配置中,并没有指定host ip,如何配置这个?

我看是在 https://github.com/xjflyttp/yii2-xunsearch/blob/master/XS.php 中写死host的,

public function getConnString()
	{
		$str = $this->_conn;
		if (is_int($str) || is_numeric($str)) {
			$str = 'localhost:' . $str;
		} elseif (strpos($str, ':') === false) {
			$str = 'unix://' . $str;
		}
		return $str;
	}

我使用docker 安装了xunsearch,但是Yii2 xunsearch默认是host,如何自定义IP呢

@xjflyttp
Copy link
Owner

XS.php是官方扩展的组件
指定主机地址是由ini决定的

目前yii2扩展已经由官方hightman维护
详细可以看那边的指引
https://github.com/hightman/xs-sdk-php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants