Welcome Guest, Not a member yet? Register   Sign In
ftp mkdir creates the directory, but returns false
#1

[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
#2

[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);
#3

[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);
...




Theme © iAndrew 2016 - Forum software by © MyBB