6
应该可以啊? 是不是你的folder的权限是read-only?
我这样总是存不了, 后来发现是folder 是read-only
$fp = fopen("$DOCUMENT_ROOT/orders/orders.txt", 'ab');
//lock the file to prevent mutiple user edit this file
flock($fp, LOCK_EX);
if (!$fp) {
echo " Your order could not be
processed this time,
please try it later
";
exit;
}
fwrite ($fp, $outPutString, strlen($outPutString));
flock ($fp, LOCK_UN);
fclose($fp);