Home  >  Article  >  Backend Development  >  ftp_put 路径有关问题

ftp_put 路径有关问题

WBOY
WBOYOriginal
2016-06-13 12:01:201148browse

ftp_put 路径问题
想用ftp_put函数上传一个文件到指定目录,连接是成功的,但是上传提示
 ftp_put() [function.ftp-put]: Usopp: UpYunFS - 403 Not Access.


echo ftp_put($conn,"caiputu/xuanzhuan.jpg","xuanzhuan.jpg",FTP_ASCII);


请教下是不是服务器路径写错了,

------解决方案--------------------
403 Not Access.
显然是权限不够啊
------解决方案--------------------
应该是上传的文件夹没有写入权限
------解决方案--------------------
服务器上存在 caiputu 目录吗?

执行 ftp_put 前,最好先 ftp_chdir 切换到目标目录
一来可确定目标目录存在,而来在多次 ftp_put 时可少些路径,减小出错的概率

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]