Home > Backend Development > PHP Tutorial > ftp_put 路径有关问题

ftp_put 路径有关问题

WBOY
Release: 2016-06-13 12:01:20
Original
1270 people have browsed it

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

<br />echo ftp_put($conn,"caiputu/xuanzhuan.jpg","xuanzhuan.jpg",FTP_ASCII);<br />
Copy after login


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

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

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

Related labels:
source:php.cn
Statement of this Website
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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template