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

使用中遇到的问题 #12

Open
Leslack-hub opened this issue Apr 20, 2019 · 3 comments
Open

使用中遇到的问题 #12

Leslack-hub opened this issue Apr 20, 2019 · 3 comments

Comments

@Leslack-hub
Copy link

来自一名小白的 提问
最想想使用hprose 这是我的错误信息
Uploading image.png…
这个是服务端代码
Uploading image.png…
客户端
Uploading image.png…
麻烦帮我看下是哪里的问题呢,hprose的资料实在太少了 没有找到 谢谢了

@Leslack-hub
Copy link
Author

错误信息
An Error occurred while handling another error:
yii\base\InvalidArgumentException: Response content must not be an array. in /www/vendor/yiisoft/yii2/web/Response.php:1063
Stack trace:
#0 /www/vendor/yiisoft/yii2/web/Response.php(337): yii\web\Response->prepare()
#1 /www/vendor/yiisoft/yii2/web/ErrorHandler.php(135): yii\web\Response->send()
#2 /www/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidConfigException))
#3 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\base\InvalidConfigException))
#4 {main}
Previous exception:
yii\base\InvalidConfigException: The directory does not exist: /www/app/web/assets in /www/vendor/yiisoft/yii2/web/AssetManager.php:213
Stack trace:
#0 /www/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\web\AssetManager->init()
#1 [internal function]: yii\base\BaseObject->__construct(Array)
#2 /www/vendor/yiisoft/yii2/di/Container.php(376): ReflectionClass->newInstanceArgs(Array)
#3 /www/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('yii\web\AssetMa...', Array, Array)
#4 /www/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('yii\web\AssetMa...', Array, Array)
#5 /www/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#6 /www/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('assetManager', true)
#7 /www/vendor/yiisoft/yii2/base/Application.php(608): yii\base\Module->get('assetManager')
#8 /www/vendor/yiisoft/yii2/web/View.php(225): yii\base\Application->getAssetManager()
#9 /www/vendor/yiisoft/yii2/web/View.php(285): yii\web\View->getAssetManager()
#10 /www/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle('Hprose\Yii\Manu...')
#11 /www/vendor/hprose/hprose-yii/src/Hprose/Yii/views/manual.php(10): yii\web\AssetBundle::register(Object(yii\web\View))
#12 /www/vendor/yiisoft/yii2/base/View.php(348): require('/www/vendor/hpr...')
#13 /www/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/www/vendor/hpr...', Array)
#14 /www/vendor/hprose/hprose-yii/src/Hprose/Yii/Server.php(84): yii\base\View->renderFile('/www/vendor/hpr...', Array)
#15 /www/vendor/hprose/hprose/src/Hprose/Http/Service.php(136): Hprose\Yii\Server->doFunctionList()
#16 /www/vendor/hprose/hprose-yii/src/Hprose/Yii/Server.php(37): Hprose\Http\Service->handle(Object(yii\web\Request), Object(yii\web\Response))
#17 /www/app/modules/member/controllers/CoreController.php(21): Hprose\Yii\Server->start()
#18 [internal function]: app\modules\member\controllers\CoreController->actionUser()
#19 /www/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#20 /www/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#21 /www/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('user', Array)
#22 /www/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('member/core/use...', Array)
#23 /www/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#24 /www/app/web/index.php(30): yii\base\Application->run()
#25 {main}

@Leslack-hub
Copy link
Author

服务端

addInstanceMethods($service); return $server->start(); } } 客服端 public function actionIndex() { $user = new Client('http://app.leslack.local/member/core/user'); $uid = $user->hello([ 'uid' => '22222', ]); }

@andot
Copy link
Member

andot commented Apr 21, 2019

你的代码看不到。

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