开发者

How to specify a location on appending a file

开发者 https://www.devze.com 2023-02-08 03:05 出处:网络
$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/
$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');
0

精彩评论

暂无评论...
验证码 换一张
取 消