当我在给定 url localhost/foldername/checkcon.php 的浏览器上运行它时。它总是发布错误
这是我的代码
<?php
$con=mysqli_connect("192.168.1.130","root","color","inventory1");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM tblemployee");
while($row = mysqli_fetch_array($result))
{
echo $row['Employee_ID'] . " " . $row['Employee_Name'];
echo "<br>";
}
mysqli_close($con);
?>