質問するログイン新規登録

質問編集履歴

3

追記

2018/12/13 08:38

投稿

ofuru.no.good
ofuru.no.good

スコア15

title CHANGED
File without changes
body CHANGED
@@ -51,9 +51,19 @@
51
51
  }
52
52
 
53
53
  ```
54
+ 補足、
54
- 補足、JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
55
+ JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
55
56
 
56
57
  file
57
58
  XMLHttpRequest : 200
58
59
  textStatus : parsererror
59
- errorThrown : Unexpected token < in JSON at position 0
60
+ errorThrown : Unexpected token < in JSON at position 0
61
+
62
+ ・$this->request で確認したところ
63
+ [stream:protected] => Zend\Diactoros\PhpInputStream Object
64
+ (
65
+ [cache:Zend\Diactoros\PhpInputStream:private] => situmon <-ここにいた!
66
+ [reachedEof:Zend\Diactoros\PhpInputStream:private] => 1
67
+ [resource:protected] => Resource id #5
68
+ [stream:protected] => php://input
69
+ )

2

修正

2018/12/13 08:38

投稿

ofuru.no.good
ofuru.no.good

スコア15

title CHANGED
File without changes
body CHANGED
@@ -23,8 +23,8 @@
23
23
 
24
24
  alert('保存成功');
25
25
  return true;
26
- }).fail(function() {
26
+ }).fail(function(XMLHttpRequest, textStatus, errorThrown) {
27
- alert('通信失敗');
27
+ alert('\n通信失敗 \nXMLHttpRequest : ' + XMLHttpRequest.status + '\ntextStatus : ' + textStatus + '\nerrorThrown : ' + errorThrown.message +'\n');
28
28
  });
29
29
  });
30
30
 
@@ -51,4 +51,9 @@
51
51
  }
52
52
 
53
53
  ```
54
- 補足、JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
54
+ 補足、JSのdataType: "json"を消すとアラートで「保存成功」となるがデータは空。
55
+
56
+ file
57
+ XMLHttpRequest : 200
58
+ textStatus : parsererror
59
+ errorThrown : Unexpected token < in JSON at position 0

1

追記

2018/12/13 06:45

投稿

ofuru.no.good
ofuru.no.good

スコア15

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