您好我从图像主机站点为转储链接创建一个表单我的问题是如果我在db中添加这种格式的链接
<a href='http://mysite.gr/img-53206dec0261b.html'><img src='http://www.mystie/upload/small/2014/03/12/53206dec0216e.jpg' alt='image' /></a>
sql没有注册。如果链接类似于此格式
<a href='http://mysite.gr/img-53206dec0261b.jpg'><img src='http://www.mystie/upload/small/2014/03/12/53206dec0216e.jpg' alt='image' /></a>
我在process.php中使用此代码
<?php
//MySQL Database Connect
include 'dbinfo.php';
$text = trim($_POST['links']);
foreach(explode("\n", $text) as $line) {
$quotes = array("/\"/","/<a href/","/border=0/","/<\/a>/");
$replacements = array("","mysql_query(\"INSERT INTO images (code) VALUES ('<a href","width=253 height=183 border=0","</a>')\");");
$newlinks = preg_replace($quotes, $replacements, $line);
eval("$newlinks");
}
?>
任何人都知道问题在哪里?