本文整理匯總了PHP中webservice::SendResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP webservice::SendResponse方法的具體用法?PHP webservice::SendResponse怎麽用?PHP webservice::SendResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類webservice
的用法示例。
在下文中一共展示了webservice::SendResponse方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dirname
$rawPath = str_replace("\\", "/", dirname(__FILE__));
$rootPath = str_replace("/bin", "/", $rawPath);
chdir($rootPath);
require_once 'dryden/loader.inc.php';
require_once 'cnf/db.php';
require_once 'inc/dbc.inc.php';
debug_phperrors::SetMode('dev');
if (file_exists('modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/webservice.ext.php')) {
include 'modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/controller.ext.php';
include 'modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/webservice.ext.php';
$api = new webservice();
if ($api->wsdataarray['request'] == '') {
$response_nomethod = new runtime_dataobject();
$response_nomethod->addItemValue('response', '1106');
$response_nomethod->addItemValue('content', 'No \'request\' method was recieved');
$api->SendResponse($response_nomethod->getDataObject());
die;
}
if ($api->CheckServerAPIKey()) {
if (method_exists($api, $api->wsdataarray['request'])) {
$api->SendResponse(call_user_func(array($api, '' . $api->wsdataarray['request'] . '')));
} else {
$response_nomethod = new runtime_dataobject();
$response_nomethod = new runtime_dataobject();
$response_nomethod->addItemValue('response', '1102');
$response_nomethod->addItemValue('content', 'Request not found');
$api->SendResponse($response_nomethod->getDataObject());
}
} else {
$response_nokey = new runtime_dataobject();
$response_nokey->addItemValue('response', '1103');