0
當我向數據庫中插入一條記錄時,我得到反斜槓,我想知道將stripslashes函數放在哪裏以照顧它們。'stripslashes()'的用法
這是什麼綁定他們。
$st->bindValue(":content", $this->content, PDO::PARAM_STR);
這裏是存儲所有參數和解析並保存日期,這樣我想,這也許能爲字符串做同樣的其他功能。
public function storeFormValues ($params) {
// Store all the parameters
$this->__construct($params);
// Parse and store the publication date
if (isset($params['publicationDate'])) {
$publicationDate = explode ('-', $params['publicationDate']);
if (count($publicationDate) == 3) {
list ($y, $m, $d) = $publicationDate;
$this->publicationDate = mktime (0, 0, 0, $m, $d, $y);
}
}
if(get_magic_quotes_gpc()) {
$content = stripslashes($content);
}
}
我不能因爲我使用雅虎虛擬主機(不是我的選擇)
不錯!謝謝你的工作 –
然後將它標記爲接受:) – Konsole