0
我有下面的代碼的問題在PHP :(頭文件已通過php發送ERROR:|
<?php echo $_GET["u"];
$servername = "localhost";
$username = "******";
$password = "*****?";
$dbname = "*****";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$tt=$_GET["u"];
$sql = "SELECT url from code WHERE BINARY short="."'$tt'";
$result=$conn->query($sql);
$data=$result->fetch_assoc();
$url="Location: ".$data["url"];
header($url); /* Redirect browser */
exit();
?>
我的問題,在這條線:(
header($url); /* Redirect browser */
$ url變量是一個鏈接從數據庫中。一個拿!
@FirstOne抱歉,但我的英語是弱:( –