PHP code example of sadapon2008 / simple-file-manager

1. Go to this page and download the library: Download sadapon2008/simple-file-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sadapon2008 / simple-file-manager example snippets


CakePlugin::load('Migrations');
CakePlugin::load('BoostCake');
CakePlugin::load('SimpleFileManager', array('bootstrap' => true));



App::uses('AppController', 'Controller');

class PostsController extends AppController {

  public $uses = array('Post');
  
  public $helpers = array('SimpleFileManager.SimpleFileManager');
  
  public function index() {
    if($this->request->is('post') || $this->request->is('put')) {
      $this->Post->create();
      $this->Post->save($this->request->data);
    }
  }
}

 $this->start('script');