SQL Server 2008不支持特殊字符

I am facing a silly but a huge problem while inserting special character on SQL Server 2008. I used to have no errors using "addslashes" on MySQL but it is not working on SQL Server 2008. Can anyone help me with this?

Just look at the example in the manual page for sqlsrv_query():

<?php
$sql = "INSERT INTO Table_1 (id, data) VALUES (?, ?)";
$params = array(1, "some data");

$stmt = sqlsrv_query( $conn, $sql, $params);
if( $stmt === false ) {
     die( print_r( sqlsrv_errors(), true));
}

The SQLSRV extension is a modern library and provides prepared statements. You don't have to do anything at all to handle special chars.

Nota: addslashes() doesn't work properly on MySQL either.