|
|
@@ -21,9 +21,9 @@ class ReceivedSms extends RestfulController
|
|
|
$data = file(APP_DIR . "/test_msg.txt");
|
|
|
$result = [];
|
|
|
foreach ($data as $datum) {
|
|
|
- $pat = "#-[操作:(.*)]#iUs";
|
|
|
+ $pat = "#\[操作:(.*)\]#iUs";
|
|
|
preg_match($pat, $datum, $arr);
|
|
|
- if ($arr) {
|
|
|
+ if ($arr[1]) {
|
|
|
print_r($arr);
|
|
|
$temp = explode("$$$", $arr[1]);
|
|
|
$result[] = [
|