gpt4 book ai didi

php - 为什么我不断收到错误 500 (mySQL)?

转载 作者:太空宇宙 更新时间:2023-11-03 12:28:47 25 4
gpt4 key购买 nike

<分区>

我使用以下 php 脚本:

<?php
error_reporting(E_ALL); ini_set('display_errors', 1);
$link = mysql_connect('mywebsite', 'login', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
//Until here, everything is PERFECT, the Connection is established.

//The following piece of code spits out error 500:
mysql_select_db("rates");
$query = "SELECT * FROM `table1` WHERE `RateName` LIKE '%res%'";
if ($r=mysql_query($query, $link)) {

while ($row=mysql_fetch_array($r)) {
print "<p><h3>{$row['UtilityName']}>/h3>
{$row['RateName']}<br />
</p><hr />\n";
}
}
else {
print mysql_error($link)
}

mysql_close($link);

?>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com