首页 > 解决方案 > 在 Zend Form 中使用外部 FTP 服务器进行文件上传

问题描述

我在 Zend 1.11 中有一个将文件上传到服务器的表单

$imageUploader = $this->createElement('file', 'docs');
$imageUploader->setDestination($uploadPath);

上传路径现在在同一台服务器上,但我想上传到外部 FTP 服务器。

当我将 uploadPath 设置为ftp://user:pass@externalserver.com:21/folder我得到“给定的目标不可写”但这个文件夹有 0777

如何建立与此 FTP 服务器的连接并在那里上传文件?

标签: phpzend-frameworkftpupload

解决方案


推荐阅读