-1

我在线运行时遇到此错误

Warning: session_start() [function.session-start]: open(/home/content/41/3604341/tmp/sess_fql4o6dd9obebt95i23lkvs3f7, O_RDWR) failed: No such file or directory (2) in /home/content/41/3604341/html/computermall/index.php on line 1

这是我的 index.php 最上面的几行

<?php session_start();
if(isset($_COOKIE['uniqueID'])=='')
{
$uniquenum = rand(1000, 10000);
setcookie('uniqueID',$uniquenum,time() + (86400 * 7)); // 86400 = 1 day
}
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
?>
4

1 回答 1

0

标头信息错误修复

ob_start(); 

在 session_start() 之前;

并像 Jochem 所说的那样创建一个可写的目录:

tmp in /home/content/41/3604341. 
于 2013-07-17T07:32:48.023 回答