【问题标题】:How to specify a location on appending a file如何在附加文件时指定位置
【发布时间】:2011-06-18 09:45:04
【问题描述】:
$myFile = "testFile.txt";
$fh = fopen($myFile, 'a');

我希望 testFile.txt 位于桌面,我在 C:/wamp/localhost/ 执行此操作

如何说明位置或可能?

请帮忙。

【问题讨论】:

    标签: php append


    【解决方案1】:

    你可以这样做:

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

    【讨论】:

      【解决方案2】:

      我想你想说如何打开你的文本文件进行追加。那么

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

      【讨论】:

        猜你喜欢
        • 2011-05-01
        • 2020-09-05
        • 1970-01-01
        • 2022-01-08
        • 1970-01-01
        • 2011-08-24
        • 2022-11-15
        • 1970-01-01
        • 2011-02-21
        相关资源
        最近更新 更多