Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在PHP的帮助下从SQL加载linktext.com时,我遇到错误_Php_Html_Sql_Hyperlink - Fatal编程技术网

在PHP的帮助下从SQL加载linktext.com时,我遇到错误

在PHP的帮助下从SQL加载linktext.com时,我遇到错误,php,html,sql,hyperlink,Php,Html,Sql,Hyperlink,我试图使用php从SQL加载一些数据到网页上,但当SQL文本数据中有超链接时,一切都停止了。。。比如linktext.com 尝试使用html特殊字符,但不起作用。我猜您需要在SQL中转义引号或使用单引号 我想试探一下,你的代码输出的链接格式不正确 $url="<a href="link.com">link.com</a>"; ## << This is the value from the database echo $url; 正如您所看到的,双引号太多

我试图使用php从SQL加载一些数据到网页上,但当SQL文本数据中有超链接时,一切都停止了。。。比如linktext.com


尝试使用html特殊字符,但不起作用。

我猜您需要在SQL中转义引号或使用单引号

我想试探一下,你的代码输出的链接格式不正确

$url="<a href="link.com">link.com</a>"; ## << This is the value from the database
echo $url;
正如您所看到的,双引号太多了,在这种情况下,您需要在代码中使用双引号,在数据库中使用单变量,或者转义字符串

$url = "<a href=\"link.com\">link.com</a>";


我不清楚这个问题,因为OP提供的信息不多。你们有什么错误?更新你们的代码什么不起作用?您需要显示一些实际的代码,您面临的错误类型-基本上是自己调试!如果您不提供我们需要帮助您的信息,我们将无法帮助您$url=;谢谢工作
$url = "<a href='link.com'>link.com</a>";