[請益] 無法把textbox的資料寫進txt檔
大家好,我有一個php寫入檔案的問題想跟大家請教,
我可以用語法把txt檔案建立起來,但卻無法把上一頁textbox裡的資料寫入txt檔裡,
不知道是語法中哪裡出了問題? 謝謝
<?php
$theText = stripslashes($Text) . "\n";
if (strlen($theText) > 10) {
$filename = "./Texts/$ip"."_"."$Sex".time().".txt";
if (file_exists($filename)) {
echo "The file $filename already exists. Delete it.";
}
else {
touch($filename);
$file = fopen($filename, "w");
flock($file,LOCK_SH);
fputs($file, $theText);
flock($file, LOCK_UN);
fclose($file);
fclose($handle);
unlink($outfile);
}
}
?>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.84.89.150
→
03/04 20:24, , 1F
03/04 20:24, 1F
→
03/04 20:24, , 2F
03/04 20:24, 2F