我想从我的 MySQL 数据库中接收数据。首先,这里是代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Filmliste</title>
<link href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-1.5.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js" type="text/javascript"></script>
</head>
<body>
<div data-role="page" id="page">
<div data-role="content">
<ul data-role="listview">
<?php
$db = mysql_connect('12345.db.1and1.com', 'dbo42545132301', 'password', 'db4255412601') or die('Fail');
$sql = "SELECT * FROM movielist";
$ergebnis = mysql_query($sql);
while($row = mysql_fetch_object($ergebnis))
{
?>
<li><a href="/detail.php"><?php $row->cover; ?> <?php $row->titel; ?></a></li>
<?php
}
$mysql_close($db);
?>
</ul>
</div>
</div>
</body>
</html>
如果我在浏览器中加载它,我会得到:致命错误:调用未定义函数:()在第 26 行的 /homepages/44/d18421343246/htdocs/project/index.php