PHP 8.5.0 Alpha 1 available for testing

Voting

: zero plus three?
(Example: nine)

The Note You're Voting On

scott dot chu at udngroup dot com
8 years ago
I'd suggest use ftp_fget() instead of ftp_get() since the latter only return TRUE or FALSE and there's no obvious way to get the cause of failure.

Using ftp_fget, you have to pass a file handle as local file, so you have to do fopen() first. By way of this, you can find 'Permission Denied' problem when call fopen(). If you use ftp_get(), there's no way to find this error cause.

In my case, I run httpd using 'nobody' and I create ftp local folder using 'haha'. It tooks me long time to find the 'Permission Denied' problem at that time since I use ftp_get() then.

<< Back to user notes page

To Top