-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo4.php
27 lines (23 loc) · 843 Bytes
/
demo4.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
// A quick and dirty SOAP server example
ini_set('soap.wsdl_cache_enabled',0); // Disable caching in PHP
$PhpWsdlAutoRun=true; // With this global variable PhpWsdl will autorun in quick mode, too
require_once('class.phpwsdl.php'); // When autorun is enabled, any line after loading PhpWsdl won't be executed!
// In quick mode you can specify the class filename(s) of your webservice
// optional parameter, if required. The next line will only be executed when
// not using autorun.
PhpWsdl::RunQuickMode();// -> Don't waste my time - just run!
class SoapDemo{
/**
* Say hello to...
*
* @param string $name A name
* @return string Response
*/
public function SayHello($name){
$name=utf8_decode($name);
if($name=='')
$name='unknown';
return utf8_encode('Hello '.$name.'!');
}
}