在php的文件夹里建立一个tmp文件夹看看

解决方案 »

  1.   

    建一个tmp目录
    修改php.ini
    将session.save_path指向你建的那个tmp目录
    重启apache
      

  2.   

    php.ini里有两个"session.save_path=/tmp"我已设置好,前面的分号也已去掉
    另外,在c:\php下设置了tmp目录,也就是c:\php\tmp,但为什么在下列程序中依然出错?
    <?
    session_start();
    ?>
    出错信息
    Warning: session_start(): open(/tmp\sess_1d2506ec8c33a38c753098ab0f2846c2, O_RDWR) failed: No such file or directory (2) in C:\Apache2\web\index1.php on line 2Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Apache2\web\index1.php:2) in C:\Apache2\web\index1.php on line 2Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Apache2\web\index1.php:2) in C:\Apache2\web\index1.php on line 2Warning: Unknown(): open(/tmp\sess_1d2506ec8c33a38c753098ab0f2846c2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
      

  3.   

    /tmp 目录要设置成系统中已经存在的目录,并且目录的属性为777