From da1222b48894060c78ea305f2f80f081d40f69ce Mon Sep 17 00:00:00 2001 From: wangguibao Date: Thu, 5 Sep 2019 16:39:44 +0800 Subject: [PATCH] Demo: HTTP interface via Python and PHP --- demo-client/php/echo.php | 1 + demo-client/php/text_classification.php | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/demo-client/php/echo.php b/demo-client/php/echo.php index d95c7a84..cfc50a4e 100644 --- a/demo-client/php/echo.php +++ b/demo-client/php/echo.php @@ -34,6 +34,7 @@ function http_post($url, $data) { curl_close($ch); return $result; } + //key value 数组,如果多,后面用逗号分开key =>value ,key1 => value1 ,.... echo http_post('http://127.0.0.1:8010/BuiltinTestEchoService/inference', array("a" => 1, "b" => 0.5)); ?> diff --git a/demo-client/php/text_classification.php b/demo-client/php/text_classification.php index 2e457161..f924135e 100644 --- a/demo-client/php/text_classification.php +++ b/demo-client/php/text_classification.php @@ -100,8 +100,6 @@ $labels = array(); read_data($argv[1], $samples, $labels); echo count($samples) . "\n"; -// key value 数组,如果多,后面用逗号分开key =>value ,key1 => value1 ,.... - $ch = &http_connect('http://127.0.0.1:8010/TextClassificationService/inference'); $count = 0; -- GitLab