|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-29 20:59 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 03:00:01 2025 UTC |
This has been discussed on the php-qa-list and it looks like you have to use ftp_connect("localhost",0,21); instead of ftp_connect("localhost",21); I've not understood what the 0 in the above example represents. While excluding the port argument (and the zero) no problem occurs. <whatLizsaid> OK, Opens a FTP stream */ PHP_FUNCTION(ftp_connect) { ftpbuf_t *ftp; char *host; int host_len, port = 0; long timeout_sec = FTP_DEFAULT_TIMEOUT; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &host, &host_len, &port, &timeout_sec) == FAILUR E) { return; } If you do ftp_connect("localhost",0,21); it connects, I don't know what host_len is, but you need to specify it before port.. Bug? </whatLizsaid>