PHP数据库操作在IIS中无法正常工作?

After this statement:

insert into table... value(..,"It\'s my title")

In database I can see :

It\'s my title

It only happens when in IIS.How to fix?

My guess is you have magic quotes enabled on IIS. Turn it off. See Disabling Magic Quotes.

I think for that statement, because you are using double quotes you don't need to escape the single quote

You can try this instead:

insert into table... value(..,'It\'s my title')

Disable the magic_quotes_gpc setting in your php.ini

First of all disable magic quotes, it is deprecated anyway. You can use either of mysql_real_escape_string or addslashes functions.

    // disable magic_quotes_runtime
    if (get_magic_quotes_runtime())
    {
        @set_magic_quotes_runtime(0);
    }