0

エラーが発生しないようにデータをサニタイズするにはどうすればよいですか? ubuntu、php 5.3 を実行し、mssql に接続しています。

これは私のコードです:

            $body = $this->get_part($imap, $b, "TEXT/HTML");
            if($body == "")
            {
                $body = $this->get_part($imap, $b, "TEXT/PLAIN");
            }
            $header = imap_headerinfo($imap, $b);
            $subject = $header->subject;
            $fromaddress = $header->fromaddress;
            $body = str_replace("'", "''", $body);
            //$body = str_replace("\"", "\"\"", $body);
            /////////////////////////////
            $data = array('content'=>$body);
            $query = $PDO->prepare('insert into [tbl_test] (content) values (:content)');
            $query->execute($data);
            break;
4

0 に答える 0