We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PHP框架 Yaf 服务器端:
<?php class IndexController extends Rpc { /** * UserController::init() * * @return void */ public function init() { parent::init(); Yaf_Dispatcher::getInstance()->disableView(); } public function indexAction(){} public function abcFunc($num) {//默认Action return 'Hello,'.$num; } public function adFunc($a){ $a = '中国'; $c = 'Hello'; $b = array('asf','Hello','asdf','中国'); return $b; } }
客户端:
<?php use Hprose\Client; class IndexController extends Yaf_Controller_Abstract { protected $web = ''; public function init(){ $config = Yaf_Application::app()->getConfig(); Yaf_Registry::set("config", $config); $rpc = $config->get("rpc"); Yaf_Registry::set("rpc", $rpc); $this->web = Client::create($rpc->host . 'index', false); } public function indexAction() {//默认Action $a = $this->web->abcFunc(1); var_dump($a); exit; //$a = "Hello World"; $this->getView()->assign("content", $a); } public function aaAction(){ $a = $this->web->aaFunc(); var_dump($a); exit; } } ?>
问题:
服务端 修改 返回的变量 当为 $a 的时候,报错如下:
$a
Yaf_Loader::autoload(): Failed opening script E:\xampp\htdocs\blog/application/\library\中国.php: No such file or directory
当为$c时,报错如下:
$c
Yaf_Loader::autoload(): Failed opening script E:\xampp\htdocs\blog/application/\library\Hello.php: No such file or directory
联系QQ: 1684097410@qq.com
The text was updated successfully, but these errors were encountered:
访问 index.action 或 返回数组的时候,是正常的
Sorry, something went wrong.
你这个错误跟 Yaf 有关,跟 hprose 没关系。你那个错误是 Yaf 的错误,我也没办法。
No branches or pull requests
PHP框架 Yaf
服务器端:
客户端:
问题:
服务端 修改 返回的变量 当为
$a
的时候,报错如下:当为
$c
时,报错如下:联系QQ:
1684097410@qq.com
The text was updated successfully, but these errors were encountered: