在php中显示链接 [英] displaying link in php

查看:108
本文介绍了在php中显示链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将存储在mysql中的URL显示为像这样的php表中的链接

I am trying to display a URL stored in mysql as a link in php table like this

echo "<td><a href=".$row['resume'].">Resume</a></td>";

其中$ row ['resume']使用mysql_fetch_array检索正确的数据

where $row['resume'] retrieves correct data using mysql_fetch_array

然而,文件链接之间的空格被自动截断

However the whitespace between file link gets truncated automatically

例如我的文件名是这是一个resume.doc我只得到这个在链接中

for example my file name is "this is a resume.doc" i only get "this" in link

帮助。

推荐答案

您需要设置引号围绕你的href属性。

You need to place quotes around your href attribute.

echo "<td><a href=\"".$row['resume']."\">Resume</a></td>";

这篇关于在php中显示链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆