How to specify a location on appending a file
$myFile = "testFile.txt";
$fh = f开发者_开发问答open($myFile, 'a');
I want the testFile.txt to be located at the Desktop, and i perform this at C:/wamp/localhost/
How could state the location or can is it possible?
Please help.
You can do:
$myFile = 'C:\Documents and Settings\<yourusername>\Desktop\testFile.txt';
i think you want to say how to open your text file for append. then
$myFile = "YOUR_DESKTOP_PATH/testFile.txt";
$fh = fopen($myFile, 'a');
精彩评论