2011-01-31 80 views
0
$myFile = "testFile.txt"; 
$fh = fopen($myFile, 'a'); 

我想TESTFILE.TXT將位於桌面指定一個位置,我位於C執行此:/ WAMP /本地主機/如何在附加文件

怎麼能說出的位置或可以嗎?

請幫忙。

回答

2

你可以這樣做:

$myFile = 'C:\Documents and Settings\<yourusername>\Desktop\testFile.txt'; 
1

我想你想說如何打開你的文本文件追加。然後

$myFile = "YOUR_DESKTOP_PATH/testFile.txt"; 
$fh = fopen($myFile, 'a');