Welcome Guest, Not a member yet? Register   Sign In
Create folders
#1

[eluser]Zimooon[/eluser]
Hey guys ,

i did a little code to create folders .

here is the controller snippet:

Code:
function createfolder()
    {
    
     $this->load->library('ftp');
     $folder = $this->input->post('folder');
     $this->ftp->mkdir('_/uploads/'.$folder);  
     $this->load->view('auth/create_folders');
    }

and here is the loaded view:

Code:
<p>&lt;?php echo form_open('image/createfolder' ); ?&gt; </p>
                    
                    <fieldset>
                        <label for="folder">Ordner:</label>
                        &lt;input type="text" id="folder" name="folder" value="" class="inputText" /&gt;
                    </fieldset>
              
    
                    <fieldset>
                        &lt;input type="submit" value="Erstellen" name="Submit"/&gt;
                    </fieldset>

                    &lt;?php echo form_close(); ?&gt;

The folder doesn't get created. I work atm on localhost. maybe chmod ? or coding fails?
best regards
#2

[eluser]Sudz[/eluser]
Have you set FTP Preferences .
or
missing this setting

Code:
$config['hostname'] = 'ftp.example.com';
$config['username'] = 'your-username';
$config['password'] = 'your-password';
$config['port']     = 21;
$config['passive']  = FALSE;
$config['debug']    = TRUE;

$this->ftp->connect($config);
#3

[eluser]Zimooon[/eluser]
Hi Sudhakar Prajapati ,

Thanks for the hint, i got the setting but the setted folder was the wrong Smile Now everything works .

best regards




Theme © iAndrew 2016 - Forum software by © MyBB