13c03-2.php

来自「介绍PHP5的给类型函数应用」· PHP 代码 · 共 23 行

PHP
23
字号
<?php// Create our service as a class:class MathService {	// A Function to add two numbers together:	function add($a, $b) {		return $a + $b;	}	// A Function to divide a by b:	function divide($a, $b) {		return $a / $b;	}}// Instantiate the new Soap Server$ss = new SoapServer("http://example.com/soap/math.wsdl");// Set it to have the functions of this class:$ss->setClass('MathService');// And handle any request that came in:$ss->handle();?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?