本文整理汇总了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());
}
示例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">