質問編集履歴
6
変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,8 +36,6 @@
|
|
36
36
|
<meta charset="UTF-8">
|
37
37
|
<link rel="stylesheet" type="text/css" href="css/top_style.css">
|
38
38
|
<script src="js/jquery-3.2.1.min.js"></script>
|
39
|
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
40
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111373095-1"></script>
|
41
39
|
<title>aaaaaaaa</title>
|
42
40
|
</head>
|
43
41
|
|
5
変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -38,13 +38,6 @@
|
|
38
38
|
<script src="js/jquery-3.2.1.min.js"></script>
|
39
39
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
40
40
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111373095-1"></script>
|
41
|
-
<script>
|
42
|
-
window.dataLayer = window.dataLayer || [];
|
43
|
-
function gtag(){dataLayer.push(arguments);}
|
44
|
-
gtag('js', new Date());
|
45
|
-
|
46
|
-
gtag('config', 'UA-111373095-1');
|
47
|
-
</script>
|
48
41
|
<title>aaaaaaaa</title>
|
49
42
|
</head>
|
50
43
|
|
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,4 +25,103 @@
|
|
25
25
|
<?php break; endforeach; ?>
|
26
26
|
</div>
|
27
27
|
</article>
|
28
|
+
```
|
29
|
+
|
30
|
+
「ソース全体」
|
31
|
+
```ここに言語を入力
|
32
|
+
<?php require('./news/wp-load.php'); ?>
|
33
|
+
<!DOCTYPE HTML>
|
34
|
+
<html>
|
35
|
+
<head>
|
36
|
+
<meta charset="UTF-8">
|
37
|
+
<link rel="stylesheet" type="text/css" href="css/top_style.css">
|
38
|
+
<script src="js/jquery-3.2.1.min.js"></script>
|
39
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
40
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111373095-1"></script>
|
41
|
+
<script>
|
42
|
+
window.dataLayer = window.dataLayer || [];
|
43
|
+
function gtag(){dataLayer.push(arguments);}
|
44
|
+
gtag('js', new Date());
|
45
|
+
|
46
|
+
gtag('config', 'UA-111373095-1');
|
47
|
+
</script>
|
48
|
+
<title>aaaaaaaa</title>
|
49
|
+
</head>
|
50
|
+
|
51
|
+
<body>
|
52
|
+
<!-- main_box -->
|
53
|
+
<section id="main_box" class="clearfix">
|
54
|
+
|
55
|
+
<!-- box1 -->
|
56
|
+
<article class="box1">
|
57
|
+
<p><img src="img/title1.png" width="560" height="138" alt="ピックアップ"></p>
|
58
|
+
<div class="box_txt">
|
59
|
+
<p><img src="img/p.jpg" width="560" height="250" alt="ピックアップ画像"></p>
|
60
|
+
</div>
|
61
|
+
</article>
|
62
|
+
<!-- box1 -->
|
63
|
+
|
64
|
+
<!-- box3 -->
|
65
|
+
<article class="box3">
|
66
|
+
<p><img src="img/title3.png" width="330" height="138" alt="youtube"></p>
|
67
|
+
<div class="box_txt">
|
68
|
+
<?php
|
69
|
+
$url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC-1QaEudvHG6K8iZOOQmWEQ";
|
70
|
+
$rss = file_get_contents($url);
|
71
|
+
$rss = preg_replace("/<([^>]+?):(.+?)>/", "<$1_$2>", $rss);
|
72
|
+
$rss = simplexml_load_string($rss,'SimpleXMLElement',LIBXML_NOCDATA);
|
73
|
+
foreach($rss->entry as $value):
|
74
|
+
|
75
|
+
?>
|
76
|
+
<?php
|
77
|
+
print($rss);
|
78
|
+
?>
|
79
|
+
<iframe width="322" height="247" src="https://www.youtube.com/embed/<?php echo htmlspecialchars($value->yt_videoId, ENT_QUOTES, 'UTF-8') ?>" frameborder="0" allowfullscreen></iframe>
|
80
|
+
<?php break; endforeach; ?>
|
81
|
+
</div>
|
82
|
+
</article>
|
83
|
+
<!-- box3 -->
|
84
|
+
|
85
|
+
|
86
|
+
</section>
|
87
|
+
<!-- main_box -->
|
88
|
+
|
89
|
+
<!-- sub_box -->
|
90
|
+
<section id="sub_box" class="clearfix">
|
91
|
+
|
92
|
+
<!-- box2 -->
|
93
|
+
<article class="box2">
|
94
|
+
<p><img src="img/title2.png" width="560" height="138" alt="ニュース"></p>
|
95
|
+
<div class="box_txt">
|
96
|
+
<ul class="wp">
|
97
|
+
<?php
|
98
|
+
$posts = get_posts("numberposts=5&category=3&orderby=post_date&offset=0");
|
99
|
+
foreach ($posts as $post):
|
100
|
+
setup_postdata($post);
|
101
|
+
?>
|
102
|
+
<li>
|
103
|
+
<p>
|
104
|
+
<?php the_time('Y.m.d') ?>
|
105
|
+
:<a href="<?php the_permalink() ?>">
|
106
|
+
<?php the_title() ?>
|
107
|
+
</a></p>
|
108
|
+
</li>
|
109
|
+
<?php endforeach; ?>
|
110
|
+
</ul>
|
111
|
+
<p class="article_p"><a href="http://aaaaaaaa.jp/news/category/new/">ニュース一覧</a></p>
|
112
|
+
</div>
|
113
|
+
</article>
|
114
|
+
<!-- box2 -->
|
115
|
+
|
116
|
+
<!-- box4 -->
|
117
|
+
<article class="box4">
|
118
|
+
<p><img src="img/title4.png" width="330" height="138" alt="ツイッター"></p>
|
119
|
+
<p class="box_txt"><a class="twitter-timeline" width="330px" height="250px" href="https://twitter.com/aaaaaaaaa?ref_src=twsrc%5Etfw">Tweets by aaaaaaaa</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></p>
|
120
|
+
</article>
|
121
|
+
<!-- box4 -->
|
122
|
+
|
123
|
+
</section>
|
124
|
+
<!-- sub_box -->
|
125
|
+
</body>
|
126
|
+
</html>
|
28
127
|
```
|
3
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
解決策をアドバイス頂けると幸いです。
|
6
6
|
|
7
|
+
参考にしたサイト:[https://sakic.jp/blog/web/latest-youtube-channel](https://sakic.jp/blog/web/latest-youtube-channel)
|
8
|
+
|
7
9
|
「現象」
|
8
10
|

|
9
11
|
|
2
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
|
5
5
|
解決策をアドバイス頂けると幸いです。
|
6
6
|
|
7
|
+
「現象」
|
8
|
+

|
9
|
+
|
7
10
|
```ここに言語を入力
|
8
11
|
<!-- box3 -->
|
9
12
|
<article class="box3">
|
1
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
下記は、youtubeの自分のチャンネルの最新動画を表示させるソースです。
|
2
|
-
これをサーバにアップするとなぜかPHPの一部が表示されて、動画が再生できず。
|
2
|
+
これをサーバにアップするとなぜかウェブサイト上にPHPの一部が表示されて、動画が再生できず。
|
3
3
|
エラーが発生しましたと動画に表示されてしまいます。
|
4
4
|
|
5
5
|
解決策をアドバイス頂けると幸いです。
|