本文整理汇总了PHP中CityApi::get_last_response_start_line方法的典型用法代码示例。如果您正苦于以下问题:PHP CityApi::get_last_response_start_line方法的具体用法?PHP CityApi::get_last_response_start_line怎么用?PHP CityApi::get_last_response_start_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CityApi
的用法示例。
在下文中一共展示了CityApi::get_last_response_start_line方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: format_json
<body>
<?php
require_once 'test-util.php';
require_once dirname(__FILE__) . '/../lib/ca-main.php';
echo '<div class="apitest">';
echo '<h1>users_processes_notes_index</h1>';
$ca = new CityApi();
$ca->debug = true;
$ca->json = true;
echo "<h2>Test:</h2>";
$userid = 238801;
$processid = 12343;
$results = $ca->users_processes_notes_index($userid, $processid, array('page' => 1));
echo "<h2>results:</h2>{$results}";
echo '<h2>Formatted JSON results: </h2>';
echo '<pre>';
echo format_json($results);
echo '</pre>';
echo '<h2>HTTP Response Info</h2>';
echo '<pre>';
var_dump($ca->get_last_status_code());
var_dump($ca->get_last_response_start_line());
var_dump($ca->get_last_headers());
echo '</pre>';
echo '</div>';
?>
</body>
</html>
示例2: dirname
require_once 'test-util.php';
require_once dirname(__FILE__) . '/../lib/ca-main.php';
try {
if ($_POST['formSubmit'] == "Submit") {
$verb = $_POST['formVerb'];
$url = $_POST['formURL'];
$body = $_POST['formJSONBody'];
$ca = new CityApi();
$ca->debug = true;
$results = $ca->call_city($verb, $url, $body);
echo "<h1>{$verb}{$url}{$body}</h1>";
echo '<h2>Results</h2>';
echo '<h3>HTTP Status</h3>';
echo $ca->get_last_status_code();
echo '<h3>HTTP Response Start Line</h3>';
echo $ca->get_last_response_start_line();
echo '<h3>HTTP Headers</h3>';
var_dump($ca->get_last_headers());
echo '<h3>City Results</h3>';
echo $results;
echo '<pre>';
echo format_json($results);
echo '</pre>';
}
} catch (Exception $e) {
echo '<h3>Exception</h3>';
echo '<pre>';
echo $e->getMessage();
echo '</pre>';
}
?>