【发布时间】:2015-04-23 07:00:22
【问题描述】:
我编写了一些代码来发布一个 PHP 文件的输出,该文件显示了我最近在 Spotify 上收听的音乐。
fiddle. 中包含 HTML、CSS 和 JS(用于 spotify.php 文件)
我的 index.php 文件中的 JS 是:
<script type="text/javascript">
function get_spotify() {
$.ajax({
type: 'POST',
url: 'https://theobearman.com/cv/modules/spotify.php',
data: {
request: 'true'
},
success: function(reply) {
$('.now-playing').html("" + reply + "");
}
});
}
window.onload = get_spotify;
</script>
我的问题是 .php 文件的输出没有显示在 my website 的“音乐”标题下。
这几天前还在工作,所以我不知道为什么现在不工作了。
提前感谢您的帮助,
西奥。
【问题讨论】:
-
代码永远不会停止工作,已经进行了导致此的更改:) 您是否遇到任何错误?如果是这样,请将它们包括在问题中。
-
我看不到。
-
添加ini_set('error_reporting', E_ALL);到你的 php 文件的顶部
标签: javascript php html css spotify