Giter Site home page Giter Site logo

Comments (4)

andot avatar andot commented on May 3, 2024

你添加的别名叫 test,所以你用 TestModel 访问是不行的。

from hprose-php.

rryqszq4 avatar rryqszq4 commented on May 3, 2024

@andot 调用test_one()也调用不行呀~
另外$server->add(new TestModel(),'TestModel'); 别名和类名一样的话就不会抛警告~

from hprose-php.

andot avatar andot commented on May 3, 2024

嗯,你说得对,参数顺序应该是这样的:

$server->add(new TestModel(), '', 'test');

或者

$server->add(new TestModel(), 'TestModel', 'test');

第二个参数表示的是对象实例所在的类(因为类有继承层次,hprose只发布指定的类的那一层的方法,第二个参数如果跟第一个对象创建的类一致,可以省略为 ''),第三个参数才是别名前缀。

from hprose-php.

rryqszq4 avatar rryqszq4 commented on May 3, 2024

@andot 按照你说的参数调用成功拉~,谢谢小马哥~

from hprose-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.