找到原因了原来是动到了magic_quotes_gpc这个!!magic_quotes_gpc boolean 
设定 GET/POST/COOKIE 三种模块的特殊字符,包含单引号、双引号、反斜线、及空字符 (NUL) 是否要自动加入反斜线当溢出字符。

解决方案 »

  1.   

    呵呵~~是阿!!但是问题又来了,以前写的PHP必须 magic_quotes_gpc=OFF
    但是拿了一套WebCalendar这支PHP来用它必须是 magic_quotes_gpc=ON
    怎么办阿~~~~难道要架设2台apache吗??
      

  2.   

    htmlentities($postcontent, ENT_QUOTES);
      

  3.   

    if (!get_magic_quotes_gpc()) {
        $lastname = addslashes($_POST['lastname']);
    } else {
        $lastname = $_POST['lastname'];
    }
      

  4.   

    如果哪个目录下面需要magic_quotes_gpc on的,在那个web目录下面建立文件".htaccess"(要进cmd模式下面建了,window下建立不了)文件内容如下:
    php_value magic_quotes_gpc 1这样就可以了