这是我的代码:
<!DOCTYPE html>
<html>
<body>
<?php
$servername = "localhost";
$username = "alasgsco_user";
$password = "pass123";
$dbname = "alasgsco_alasdb";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT 'ime' FROM 'kafici'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<p>" . $row['ime'] . "<br />";
}
$conn->close();
?>
</body>
</html>
'kafici'是表的名称 'ime'是列的名称 为什么我的代码不起作用? 有人请帮帮我!提前谢谢。