Skip to content

A modern, secure, and feature-rich PHP file manager with beautiful Bulma UI. Built for standalone use or seamless integration with frameworks like CodeIgniter 4.

License

Notifications You must be signed in to change notification settings

LifeIsHex/php-file-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PHP File Manager

License: MIT PHP Version Bulma

A modern, secure, and feature-rich PHP file manager with beautiful Bulma UI. Built for standalone use or seamless integration with frameworks like CodeIgniter 4.

πŸ€– Built with Antigravity - This project was developed using AI-assisted coding.


✨ Features

File Operations

  • πŸ“ Browse & Navigate - Intuitive directory browsing with breadcrumb navigation
  • ⬆️ Upload Files - Drag-and-drop file uploads with progress indicators
  • πŸ“₯ Download - Single file or multi-file download as ZIP
  • ✏️ Rename - Quick inline renaming
  • πŸ—‘οΈ Delete - Single or bulk delete with confirmation modal
  • πŸ“‹ Copy & Paste - Clipboard operations with cut/copy/paste
  • πŸ“¦ Compress - Create ZIP archives from selected files

Multi-Select Operations

  • β˜‘οΈ Checkbox Selection - Select multiple files with checkboxes
  • πŸ–±οΈ Shift+Click - Range selection like native file managers
  • ⌨️ Ctrl/Cmd+Click - Add/remove from selection
  • 🎯 Select All - Quick select/deselect all items
  • πŸ”§ Bulk Actions - Cut, copy, delete, download selected files

Drag & Drop

  • 🎯 Drag to Move - Drag files/folders into other folders
  • 🎨 Visual Feedback - Drop targets highlight during drag
  • πŸ“¦ Multi-Drag - Select multiple items and drag them together
  • βœ… Confirmation Modal - Preview move operation before confirming

Preview & View

  • πŸ–ΌοΈ Image Preview - View images with dimensions
  • πŸ“„ Text/Code View - Syntax-highlighted code preview
  • πŸ“‘ PDF Viewer - Inline PDF viewing
  • 🍎 HEIC Support - Apple HEIC/HEIF image preview and dimensions

Security

  • πŸ” Authentication - Built-in login with password hashing
  • πŸ›‘οΈ CSRF Protection - Token-based form protection
  • πŸ“‚ Path Validation - Prevents directory traversal attacks
  • βš™οΈ Configurable Auth Bypass - Optional for framework integration

Modern UI

  • 🎨 Bulma CSS - Clean, responsive design
  • πŸŒ™ Context Menu - Right-click actions
  • πŸ”” Toast Notifications - Non-intrusive feedback
  • πŸ“± Responsive - Works on desktop and mobile

πŸ“Έ Screenshots

sign-in.png Screenshot 2026-02-10 at 11.46.26β€―AM.png Screenshot 2026-02-10 at 11.46.33β€―AM.png Screenshot 2026-02-10 at 11.46.43β€―AM.png Screenshot 2026-02-10 at 11.46.48β€―AM.png Screenshot 2026-02-10 at 11.47.23β€―AM.png Screenshot 2026-02-10 at 11.48.05β€―AM.png Screenshot 2026-02-10 at 11.50.15β€―AM.png Screenshot 2026-02-10 at 11.52.08β€―AM.png Screenshot 2026-02-10 at 11.55.34β€―AM.png Screenshot 2026-02-10 at 12.18.30β€―PM.png Screenshot 2026-02-10 at 12.19.15β€―PM.png Screenshot 2026-02-10 at 12.19.42β€―PM.png


πŸš€ Installation

Via Composer

composer require lifeishex/php-file-manager

Manual Installation

  1. Clone or download the repository
  2. Copy files to your project
  3. Configure config.php

βš™οΈ Configuration

Create or modify config.php:

<?php
return [
    'fm' => [
        'root_path' => '/path/to/managed/files',
        'title' => 'File Manager',
        'language' => 'en',
        'date_format' => 'Y-m-d H:i',
        'show_hidden' => false,
    ],
    'auth' => [
        'require_login' => true,
        'username' => 'admin',
        'password' => password_hash('your-password', PASSWORD_DEFAULT),
    ],
    'upload' => [
        'max_file_size' => 50 * 1024 * 1024, // 50MB
        'chunk_size' => 1 * 1024 * 1024,     // 1MB chunks
        'allowed_extensions' => ['*'],       // All extensions
    ],
    'security' => [
        'csrf_enabled' => true,
    ],
];

πŸ”§ Standalone Usage

<?php
require_once 'vendor/autoload.php';

use FileManager\FileManager;

$config = require 'config.php';
$fileManager = new FileManager($config);
$fileManager->run();

πŸ”Œ Framework Integration

CodeIgniter 4

<?php
// app/Controllers/FileManagerController.php
namespace App\Controllers;

use FileManager\Integration\FileManagerService;

class FileManagerController extends BaseController
{
    public function index()
    {
        $config = [
            'fm' => [
                'root_path' => WRITEPATH . 'uploads',
                'asset_path' => '/filemanager/assets',
            ],
            'auth' => [
                'require_login' => false, // Use CI4's auth
            ],
        ];
        
        $fileManager = new FileManagerService($config);
        return $fileManager->handleRequest();
    }
}

Dynamic Root Path

// Per-user file management
$config['fm']['root_path'] = WRITEPATH . 'uploads/user_' . session()->get('user_id');

πŸ“‹ Requirements

  • PHP 8.3+
  • ext-zip - For multi-file ZIP downloads
  • ext-mbstring - For proper string handling

Optional

  • sips (macOS) or ImageMagick - For HEIC image support

🀝 Contributing

Contributions are welcome! This is an MIT-licensed open-source project.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Mahdi Hezaveh


⭐ Support

If you find this project useful, please consider giving it a ⭐ on GitHub! Your support helps the project grow and motivates continued development.

Star on GitHub


About

A modern, secure, and feature-rich PHP file manager with beautiful Bulma UI. Built for standalone use or seamless integration with frameworks like CodeIgniter 4.

Resources

License

Stars

Watchers

Forks

Packages

No packages published