问题如题。
最近在学PHP,看到fprintf这里,尝试打印“\n”,怎么样都打不出来(其他内容正常)。请问下,这是什么原因啊?怎么在文件中打印出“\n”呢?谢谢~~附PHP代码:
    $outputstring = $date."\t".$tireqty." tires \t".$oilqty." oil\t".$sparkqty." spark plugs\t\$".$totalamount."\t".$address."\n";
    // open file for appending
    @$fp = fopen("$DOCUMENT_ROOT/flyfy1_data/practice/orders.txt","a+t");
    if(!fp)
    {
            echo "<p><strong>Your order could not be processed at this time.. Please try again later.</strong></p>";
    }
    echo $outputstring;    fwrite($fp,$outputstring,strlen($outputstring)+10);
    fprintf($fp,"\n");