diff options
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r-- | ext/ftp/php_ftp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 4f967d1ee0..e76f3c7096 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -551,7 +551,11 @@ PHP_FUNCTION(ftp_get) RETURN_FALSE; } +#if defined(WIN32) || defined(WINNT) + if ((outfp = V_FOPEN(arg2->value.str.val, "wb")) == NULL) { +#else if ((outfp = V_FOPEN(arg2->value.str.val, "w")) == NULL) { +#endif fclose(tmpfp); php_error(E_WARNING, "error opening %s", arg2->value.str.val); RETURN_FALSE; @@ -635,7 +639,11 @@ PHP_FUNCTION(ftp_put) convert_to_string(arg3); XTYPE(xtype, arg4); +#if defined(WIN32) || defined(WINNT) + if ((infp = V_FOPEN(arg3->value.str.val, "rb")) == NULL) { +#else if ((infp = V_FOPEN(arg3->value.str.val, "r")) == NULL) { +#endif php_error(E_WARNING, "error opening %s", arg3->value.str.val); RETURN_FALSE; } |