Doc #73642 [Fbk->Opn]: ftp_mkdir make an error if fodler exist
| From: | pottierbaptiste at gmail dot com | Date: | Sun, 04 Dec 2016 14:02:18 +0000 |
| Subject: | Doc #73642 [Fbk->Opn]: ftp_mkdir make an error if fodler exist | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14170@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
User updated by: pottierbaptiste at gmail dot com
Reported by: pottierbaptiste at gmail dot com
Summary: ftp_mkdir make an error if fodler exist
-Status: Feedback
+Status: Open
Type: Documentation Problem
Package: FTP related
Operating System: mac OSX
PHP Version: 7.0.13
Block user comment: N
Private report: N
New Comment:
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 )
Previous Comments:
------------------------------------------------------------------------
[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