Home  >  Article  >  Backend Development  >  怎么得到远程类中的一个方法返回的数据

怎么得到远程类中的一个方法返回的数据

WBOY
WBOYOriginal
2016-06-13 10:21:36887browse

如何得到远程类中的一个方法返回的数据?
如果是在本地的话 直接new 下这个类就可以得到return这个方法 但是如果是2个不同的网站呢

class list{
public function index(){
return 123;
}
}

如上例 在本地 new list 然后调用index 就可以了

------解决方案--------------------
远程写个php接口就行了。。。 数据用json,xml封装一下都行。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn