我正在制作一个脚本来打开远程文件(ftp)并使用fopen和fwrite.I编辑它。我连接到ftp时有问题。我做了这段代码
$handle = fopen("ftp://".$ftp['username'].":".$ftp['password']."@".$ftp['server']."/cstrike/addons/amxmodx/configs/users.ini", "w") or die("ftp error");
fwrite($handle,$text."\n") or die('err2.');已设置al变量。我尝试使用ftp://...在网页中,它的works.allow_url_fopen是开着的…它只显示"ftp错误“
发布于 2012-05-11 21:44:20
带有fopen("ftp://...", "w");的ftp://处理程序only allows creating new files。
如果文件已经存在,你只能在设置了覆盖的情况下打开它,也就是w+模式。
https://stackoverflow.com/questions/10552388
复制相似问题