如何使用php和ftp编辑txt文件

时间:2013-09-27 09:35:27

标签: php ftp fopen

我想使用php编辑(写一些数据)到位于ftp服务器上的txt文件。

我查看了这篇文章writing to a file using php ftp

但在这种情况下应用CHMOD 0777,我的服务器无法理解。

1 个答案:

答案 0 :(得分:0)

就这么简单!

<?php
$handle = fopen("ftp://user:password@example.com/somefile.txt", "w");
?>

有效!

相关问题