0
我的PHP變量像PHP變量級聯和文本文件換行符
$boothsizetopges = "CHILDREN'S CLUB MARCH 2013
EHIBITING COLLECTION NAME: $company
BOOTH SIZE: $booth_size
";
$companyinfo = "
CONTACT INFORMATION
EXHIBITING COLLECTION NAME: $company
BOOTH NUMBER: $booth
CONTACT: $contact
BOOTH SIZE: $booth_size
CONTACT CELL: $contact_cell
CONTACT EMAIL: $email
STREET ADDRESS: $street
CITY, STATE, ZIP: $city ";
$message = $boothsizetopges . $companyinfo ;
,我的寫作$消息代碼.txt文件是
$myFile = "exfiles/".str_replace(" ","-",$_POST['companyname'])."_".time().".txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $message;
fwrite($fh, $stringData);
fclose($fh);
這裏我的問題是.TXT文件輸出打印在一行中,沒有換行符。 但是在郵件中,數據在每行中都很好。
需要幫助...
你肯定行符不存在?你如何打開查看文件? – 2013-03-05 12:34:36