Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 zend-soap 创建我的第一个 Web 服务,但我需要它有一些带有连字符的参数(如parameter-name)。我必须实现一个给定的 WSDL,所以我不能改变这个要求。
parameter-name
我该怎么做,因为 PHP 不允许带有连字符的变量?
您使用自动发现功能吗?类属性正在转换为 WSDL 参数,因此您必须遵循 PHP 的属性语法。所以在这种情况下,我认为只有创建自己的 WSDL 或在 Zend 中进行核心更改才有可能,但我认为这不是一个好的建议。