奇怪的问题在这里。将URL插入我的一个字段时收到403错误。(奇怪的是,即使它是相同的数据类型,我也可以将它插入ShareImage中,并且我试图插入相同的东西)。问题仅在于PreviewImage列。两者都是数据库中的varchar(300)
这是我的pdo插入:
$previewShare = "http://www.google.com"; (this will insert fine on its
own)
$fbshare = "http://www.google.com"; (with this I get a 403 but without the
slashes is working fine)
$sqlInsert = ("UPDATE comparisonProducts SET ShareImage = :si,
PreviewImage = :pi WHERE Site = :site AND Id = :product");
}
$preparedStatement = $db->prepare($sqlInsert);
$preparedStatement->execute(array(':site' => $_SESSION['site'], ':si' => $fbShare, ':product' => $product, ':pi' => $previewShare));