當前位置: 首頁>>代碼示例>>PHP>>正文


PHP jsonRPCClient::writeSomething方法代碼示例

本文整理匯總了PHP中jsonRPCClient::writeSomething方法的典型用法代碼示例。如果您正苦於以下問題:PHP jsonRPCClient::writeSomething方法的具體用法?PHP jsonRPCClient::writeSomething怎麽用?PHP jsonRPCClient::writeSomething使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jsonRPCClient的用法示例。


在下文中一共展示了jsonRPCClient::writeSomething方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: jsonRPCClient

<?php

require_once 'jsonRPCClient.php';
$myExample = new jsonRPCClient('http://jsonrpcphp.org/server.php');
// performs some basic operation
echo '<b>Attempt to perform basic operations</b><br />' . "\n";
try {
    echo 'Your name is <i>' . $myExample->giveMeSomeData('name') . '</i><br />' . "\n";
    $myExample->changeYourState('I am using this function from the network');
    echo 'Your status request has been accepted<br />' . "\n";
} catch (Exception $e) {
    echo nl2br($e->getMessage()) . '<br />' . "\n";
}
// performs some strategic operation, locally allowed
echo '<br /><b>Attempt to store strategic data</b><br />' . "\n";
try {
    $myExample->writeSomething('Strategic string!');
    echo 'Strategic data succefully stored';
} catch (Exception $e) {
    echo nl2br($e->getMessage());
}
開發者ID:soundasleep,項目名稱:jsonrpcclient,代碼行數:21,代碼來源:client.php

示例2: isset

              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Project JSON-RPC</a>
          </div>
        </div>
      </div>
            <div class="panel-group" id="accordion">
						<?php 
//if there's any user action
$action = isset($_POST['action']) ? $_POST['action'] : "";
if ($action == 'create') {
    $nama = $myExample->nama('name');
    $pesan = "" . $nama . "" . $_POST['pesan'];
    $myExample->writeSomething($pesan);
    $action = null;
}
?>
                <form action="#" method="POST" role="form">
				<div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">Communication</a>
                        </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
開發者ID:PUSRISTEK,項目名稱:JSON-RPC-AJAX-CHAT,代碼行數:31,代碼來源:index.php


注:本文中的jsonRPCClient::writeSomething方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。