質問編集履歴

3

修正

2018/08/22 06:46

投稿

aiueoaiueoaiue
aiueoaiueoaiue

スコア94

test CHANGED
File without changes
test CHANGED
@@ -42,6 +42,8 @@
42
42
 
43
43
  //test.php
44
44
 
45
+ <?php
46
+
45
47
  header("Access-Control-Allow-Origin: *");
46
48
 
47
49
  header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
@@ -50,7 +52,9 @@
50
52
 
51
53
  print($item);
52
54
 
53
- print("かきくけこ")
55
+ print("かきくけこ");
56
+
57
+ ?>
54
58
 
55
59
  ```
56
60
 

2

修正

2018/08/22 06:46

投稿

aiueoaiueoaiue
aiueoaiueoaiue

スコア94

test CHANGED
File without changes
test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  header("Access-Control-Allow-Origin: *");
46
46
 
47
- header("Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept");
47
+ header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
48
48
 
49
49
  $item = $_POST['item'];
50
50
 

1

追記

2018/08/22 06:44

投稿

aiueoaiueoaiue
aiueoaiueoaiue

スコア94

test CHANGED
File without changes
test CHANGED
@@ -61,3 +61,5 @@
61
61
  ###補足
62
62
 
63
63
  PHP5.6
64
+
65
+ [参考サイト](http://blue-bear.jp/kb/javascript-javascriptからphpに値を渡して処理させる/)