質問編集履歴

3

追記

2018/12/13 08:38

投稿

ofuru.no.good
ofuru.no.good

スコア15

test CHANGED
File without changes
test CHANGED
@@ -104,7 +104,9 @@
104
104
 
105
105
  ```
106
106
 
107
+ 補足、
108
+
107
- 補足、JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
109
+ JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
108
110
 
109
111
 
110
112
 
@@ -115,3 +117,21 @@
115
117
  textStatus : parsererror
116
118
 
117
119
  errorThrown : Unexpected token < in JSON at position 0
120
+
121
+
122
+
123
+ ・$this->request で確認したところ
124
+
125
+ [stream:protected] => Zend\Diactoros\PhpInputStream Object
126
+
127
+ (
128
+
129
+ [cache:Zend\Diactoros\PhpInputStream:private] => situmon <-ここにいた!
130
+
131
+ [reachedEof:Zend\Diactoros\PhpInputStream:private] => 1
132
+
133
+ [resource:protected] => Resource id #5
134
+
135
+ [stream:protected] => php://input
136
+
137
+ )

2

修正

2018/12/13 08:38

投稿

ofuru.no.good
ofuru.no.good

スコア15

test CHANGED
File without changes
test CHANGED
@@ -48,9 +48,9 @@
48
48
 
49
49
  return true;
50
50
 
51
- }).fail(function() {
51
+ }).fail(function(XMLHttpRequest, textStatus, errorThrown) {
52
52
 
53
- alert('通信失敗');
53
+ alert('\n通信失敗 \nXMLHttpRequest : ' + XMLHttpRequest.status + '\ntextStatus : ' + textStatus + '\nerrorThrown : ' + errorThrown.message +'\n');
54
54
 
55
55
  });
56
56
 
@@ -105,3 +105,13 @@
105
105
  ```
106
106
 
107
107
  補足、JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
108
+
109
+
110
+
111
+ file
112
+
113
+ XMLHttpRequest : 200
114
+
115
+ textStatus : parsererror
116
+
117
+ errorThrown : Unexpected token < in JSON at position 0

1

追記

2018/12/13 06:45

投稿

ofuru.no.good
ofuru.no.good

スコア15

test CHANGED
File without changes
test CHANGED
@@ -104,4 +104,4 @@
104
104
 
105
105
  ```
106
106
 
107
- 説明不足で申し訳ありません。。
107
+ 、JSのdataType: "json"を消すとアラート「保存成功」となるがデータは空