Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/253.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 上传我的网站时混淆错误消息_Php_Html - Fatal编程技术网

Php 上传我的网站时混淆错误消息

Php 上传我的网站时混淆错误消息,php,html,Php,Html,我在MAMP做了一个测试网站。一切都很好 然而,当我上传它时,我在一个关键页面上收到了很多错误消息 查看错误消息的链接为: 我认为查看该页面的代码可能有用: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xht

我在MAMP做了一个测试网站。一切都很好

然而,当我上传它时,我在一个关键页面上收到了很多错误消息

查看错误消息的链接为:

我认为查看该页面的代码可能有用:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ryan Murphy's Music Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/BBC_Radio_1.svg/175px-BBC_Radio_1.svg.png">
<link rel="stylesheet" href="stylesheet.css" type="text/css" media="screen" />
<img src="http://blogs.howtogeek.com/mysticgeek/files/2008/08/618pxlast.fm-logo.svg.preview.png" style="padding-left:10px;">

</head>
<body>
<h1>Most popular artist this week</h1>
<div id="navbar"><ul>
<li><a href="index.php">Home</a></li>
<li><a href="music.php">Track Playlist from the last week</a></li>
<li><a href="artist.php">Most played Artist from the last week</a></li>
<li><a href="sources.html">Sources Used</a></li>

</ul>
</div>

<table>
<th>Artist</th>
<th>Times played this week</th>
<th>Previous plays</th>

<?php
foreach ($xml->artists->children() as $child)
{
  echo "<tr>";
  $artist = (string)$child->name;
  echo "<td>$artist</td>";
  $playedweek = (string)$child->plays;
  echo "<td>$playedweek</td>";
  $previousplays = (string)$child->previous_plays;
  echo "<td>$previousplays</td>"; 
  echo "</tr>";
}?>
</table>
</body>
</html>

瑞安·墨菲的音乐网站
本周最受欢迎的艺术家
艺术家 《泰晤士报》本周播出 前戏 艺术家->子对象()作为$child) { 回声“; $artist=(字符串)$child->name; 回声“$artist”; $playedweek=(字符串)$child->plays; echo“$playedweek”; $previousplays=(字符串)$child->previousplays; 回显“$previousplays”; 回声“; }?>
您可以执行如下方法调用:

$obj->children()
但是,$obj不是一个对象。尝试
var\u dump($obj)
查看它包含的内容。

@Ryan Murphy甚至在第28行显示/home/ryanmur1/public\u html/musicsite/artist.php