Php 为什么当我把这段代码放到文件中时,会得到HTTP错误500?

Php 为什么当我把这段代码放到文件中时,会得到HTTP错误500?,php,localhost,Php,Localhost,缺失“;”行中的回显“您没有客户端!”检查错误日志。您是否连上了?使用API呢?上帝也只知道,$result从哪里来。你少了一个在回显“您没有客户端!”可能重复的^^ <?php if(mysqli_num_rows($result) > 0) { while( $row = mysqli_fetch_assoc($result)) { echo "<tr>"; echo "<td>"

缺失“;”行中的
回显“您没有客户端!”

检查错误日志。您是否连上了?使用API呢?上帝也只知道,
$result
从哪里来。你少了一个
回显“您没有客户端!”
可能重复的^^
<?php

    if(mysqli_num_rows($result) > 0) {

        while( $row = mysqli_fetch_assoc($result)) {
            echo "<tr>";
            echo "<td>" . $row['name'] . "</td><td>" . $row['email'] . "</td><td>" . $row['phone'] . "</td><td>" . $row['address'] . "</td><td>" . $row['company'] . "</td><td>" . $row['notes'] . "</td>";

            echo '<td><a href="edit.php?id=' . $row['id'] . '" type="button" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-edit"></span></a></td>';
            echo "</tr>";
        }
    }else {
        echo "<div class='alert alert-warning'>You have no Clients!</div>"
    }

    mysqli_close($conn);
    ?>