Topic: Create folder
I have a code to create a folder but I get the same name and if I leave it blank does not work.
<!-- Filesmanager_create_folder--> <?php $folder = " name of folder "; if (Request::post('folderName')) { if (Dir::exists( '../public/uploads/'.$folder )) { echo '<div class="alert alert-error"> <button type="button" class="close" data-dismiss="alert">x</button> <p> File '. $folder.' exists</p> </div>'; }else{ Dir::create( '../public/uploads/'.$folder ); Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$folder); } } echo ( '<div class="well">'. Form::open(null, array('enctype' => 'multipart/form-data')). Form::input('text', ' ', array('type' => 'text', 'name' => 'folderName')).Html::br(). Form::submit( 'folderName', __('Create folder', 'filesmanager'), array( 'class' => 'btn default btn-small')). Form::close() .'</div>' ); ?> <!-- /Filesmanager_create_folder-->