2011-02-08 8 views

उत्तर

8
<?php 

// include zend framework in the include path 

function methodname($var) { 
echo "Hello world - $var"; 
} 

$server = new Zend_Rest_Server(); 
$server->addFunction('methodname'); 
$server->handle(); 
?> 

इस वेब सेवा को कॉल करने के लिए, URL जहाँ आप निम्नलिखित तर्क

http://www.example.com/index.php?method=methodname&var=Test

जो

Hello world - Test 
+0

के उत्पादन में दे देंगे आप के लिए thunk के साथ इस PHP फ़ाइल बचाया है खोलने आपकी मदद ... आपको संपर्क में रहो। – Karthik

संबंधित मुद्दे