From 1a346a5ae82edd44c7544368932c71641f1a3257 Mon Sep 17 00:00:00 2001 From: "altob.rd" Date: Fri, 27 Oct 2017 11:19:09 +0800 Subject: [PATCH] zzz --- coworker/mqtt_service.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coworker/mqtt_service.php b/coworker/mqtt_service.php index c0e47ff..4d5abda 100644 --- a/coworker/mqtt_service.php +++ b/coworker/mqtt_service.php @@ -72,6 +72,8 @@ $mqtt->close(); function procmsg($topic, $msg) { + trigger_error("..{$topic}|{$msg}.."); + $data = array('topic' => $topic, 'msg' => $msg, 'ck' => md5($topic.'altob'.$msg)); if(in_array($topic, array('altob.888.mqtt'))) @@ -82,8 +84,7 @@ function procmsg($topic, $msg) curl_setopt($ch, CURLOPT_POST, true); // 啟用POST curl_setopt($ch, CURLOPT_URL, 'http://localhost/carpark.html/mqtt_service/'); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); - $result = curl_exec($ch); + $result = curl_exec($ch); + trigger_error("..curl|{$result}.."); } - - trigger_error("..{$topic}|{$msg}..curl:{$result}.."); }