CodeIgniter Forums
ftp mkdir creates the directory, but returns false - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: ftp mkdir creates the directory, but returns false (/showthread.php?tid=50503)



ftp mkdir creates the directory, but returns false - El Forum - 03-28-2012

[eluser]dailygrind[/eluser]
Code:
$this->ftp->mkdir('/whatever');

returns false (and generates an error), but it creates the directory correctly. It doesn't look like a CI issue though, because the PHP ftp_mkdir function actually returns false.

Any idea why?

thanks for helping


ftp mkdir creates the directory, but returns false - El Forum - 03-28-2012

[eluser]InsiteFX[/eluser]
Look at your path and then look below at the path!
Also if you turn debug on in your config file it should display its own error message.

Code:
// Creates a folder named "bar"
$this->ftp->mkdir('/public_html/foo/bar/', DIR_WRITE_MODE);



ftp mkdir creates the directory, but returns false - El Forum - 03-28-2012

[eluser]TWP Marketing[/eluser]
Insitefx is quoting from the User Guide, FTP class: (emphasis mine)
Quote:...
$this->ftp->mkdir()

Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, <b>with a trailing slash</b>. Permissions can be set by passed an octal value in the second parameter.
Code:
// Creates a folder named "bar"
$this->ftp->mkdir('/public_html/foo/bar/', DIR_WRITE_MODE);
...