Doc #73642 [Opn->Ver]: ftp_mkdir make an error if folder exist
| From: | cmb@php.net | Date: | Fri, 19 Feb 2021 14:53:51 +0000 |
| Subject: | Doc #73642 [Opn->Ver]: ftp_mkdir make an error if folder exist | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18571@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73642&edit=1
ID: 73642
Updated by: cmb@php.net
Reported by: pottierbaptiste at gmail dot com
Summary: ftp_mkdir make an error if folder exist
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: FTP related
Operating System: mac OSX
PHP Version: 7.0.13
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-12-04 14:02:17] pottierbaptiste at gmail dot com
Yes indeed. Thks is rxactly that i rrceive a "warning". Thks is really easy to test. I
should have a return to "false" and i have a warning ( error and cancel the process )
------------------------------------------------------------------------
[2016-12-02 11:16:52] requinix@php.net
Are you saying that PHP emits a warning when the mkdir fails? What is the message?
------------------------------------------------------------------------
[2016-12-02 10:34:51] pottierbaptiste at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.ftp-mkdir
---
In document is written that ftp_mkdir return false is folder already existe it seems to be false,
it's an error i have to write it with a "@":
if (@ftp_mkdir($conn_id, $myfolder)) {
echo "$myfolder has been created > success ";
} else {
echo "oups, there is a probleme...";
}
Test script:
---------------
if (@ftp_mkdir($conn_id, $myfolder)) {
echo "$myfolder has been created > success ";
} else {
echo "oups, there is a probleme...";
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73642&edit=1