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

質問編集履歴

2

誤字の修正

2019/07/19 15:40

投稿

okina
okina

スコア471

title CHANGED
File without changes
body CHANGED
@@ -1,5 +1,5 @@
1
1
  ajaxで別ドメインのphpにデータをpostしようと思っています。
2
- 今使っているサーバがCGI非対応なので、phpファイルだけ別のサーバに置こうと思っていますが、phpをサーバがSSL非対応のため、
2
+ 今使っているサーバがCGI非対応なので、phpファイルだけ別のサーバに置こうと思っていますが、phpを置くサーバがSSL非対応のため、
3
3
 
4
4
  Mixed Content: The page at 'https://XXX/index.html' was loaded over HTTPS,
5
5
  but requested an insecure script 'http:/XYZ/example.php'.

1

詳細の追加

2019/07/19 15:40

投稿

okina
okina

スコア471

title CHANGED
File without changes
body CHANGED
@@ -1,9 +1,26 @@
1
1
  ajaxで別ドメインのphpにデータをpostしようと思っています。
2
2
  今使っているサーバがCGI非対応なので、phpファイルだけ別のサーバに置こうと思っていますが、phpを奥サーバがSSL非対応のため、
3
3
 
4
- Mixed Content: The page at 'https://example.com/1/' was loaded over
4
+ Mixed Content: The page at 'https://XXX/index.html' was loaded over HTTPS,
5
- HTTPS, but requested an insecure favicon 'https://example.com/2/'.
5
+ but requested an insecure script 'http:/XYZ/example.php'.
6
6
  This request has been blocked; the content must be served over HTTPS.
7
7
 
8
+
8
9
  とエラーが出ます。
9
- 何か対策はありますでしょうか?
10
+ 何か対策はありますでしょうか?
11
+
12
+ ```jquery
13
+ $.ajax({
14
+ type: 'POST',
15
+ url: 'http:/XYZ/example.php',
16
+ data: {name:value},
17
+ }).done(function(){
18
+ console.log("OK");
19
+ }).fail(function(){
20
+ console.log("ng");
21
+ });
22
+ ```
23
+
24
+ ```PHP
25
+ $name = $$_POST['name'];
26
+ ```