Php 超链接sql绝对路径

Php 超链接sql绝对路径,php,sql,Php,Sql,我存储在sql 1列中,链接如下:http:www.cnn.com 当我点击用下面的代码创建的超链接时,它会在它前面添加我的搜索表单的url。比如u12.web.zsxc.com/dir1/dir2/cnn.com 如何解决这个问题 我的代码: while($row = mysqli_fetch_array($result)) { echo '<tr><td><a href="'.$row['hyeperlink'].'">'.$row['name'].'&

我存储在sql 1列中,链接如下:http:www.cnn.com 当我点击用下面的代码创建的超链接时,它会在它前面添加我的搜索表单的url。比如u12.web.zsxc.com/dir1/dir2/cnn.com

如何解决这个问题

我的代码:

while($row = mysqli_fetch_array($result))
{
 echo '<tr><td><a href="'.$row['hyeperlink'].'">'.$row['name'].'</a>     </td></tr>';
 }
while($row=mysqli\u fetch\u数组($result))
{
回声';
}

您没有指定要返回的数组类型,因此可能会得到一个数字数组。将while循环更改为:

while($row = mysqli_fetch_assoc($result)) {

您没有指定要返回的数组类型,因此可能得到的是数字数组。将while循环更改为:

while($row = mysqli_fetch_assoc($result)) {
你的PHP部分

while($row = mysqli_fetch_assoc($result))
{
 echo '<tr><td><a href="'.$row['hyeperlink'].'">'.$row['name'].'</a>     </td></tr>';
 }
while($row=mysqli\u fetch\u assoc($result))
{
回声';
}
在url中,数据应包括
http://

例如:

您的PHP部分

while($row = mysqli_fetch_assoc($result))
{
 echo '<tr><td><a href="'.$row['hyeperlink'].'">'.$row['name'].'</a>     </td></tr>';
 }
while($row=mysqli\u fetch\u assoc($result))
{
回声';
}
在url中,数据应包括
http://


例如:

您可以包含SQL查询吗?另外,“http:www.cnn.com”也应该包含“/”。“http://”那么预期的URL是什么?而
echo$row['hyeperlink']是什么向您展示?您可以包括SQL查询吗?另外,“http:www.cnn.com”也应该有“/”。“http://”那么预期的URL是什么?而
echo$row['hyeperlink']是什么给你看?勉强打败我。勉强打败我。