我想使用 php 编辑(写入一些数据)到位于 ftp 服务器上的 txt 文件。
我看了这篇文章,使用 php ftp 写到一个文件
但在这种情况下,应用了我的服务器无法理解的 CHMOD 0777。
就
这么简单!
<?php
$handle = fopen("ftp://user:password@example.com/somefile.txt", "w");
?>
成功了!