Pheditor is a single-file editor and file manager written in PHP.
- Editor with syntax highlighting
- File Manager (create, rename and delete files and directories)
- Password protected area
- Keeping the history of edited files and changes
- Keyboard shortcuts
- Access levels for reading and writing and other permissions
- Terminal
- Dark mode
- Search in files
- Web server (Nginx, Apache, or etc)
- PHP 7.2 or above
Install using composer:
composer create-project pheditor/pheditor
or just upload pheditor.php
to your web host (and/or rename it as you wish).
By default Pheditor uses CDN to load required libraries but also it is possible to load assets from local directory.
For using local assets follow these steps:
- Edit
pheditor.php
and changeLOCAL_ASSETS
definition totrue
.
define('LOCAL_ASSETS', true);
- Run
npm i
to install required dependencies.
NOTES:
- The default password is
admin
. Please change the password after install or first login. - As the script gives permission to edit files, it is recommended to keep the address secret or protected depending on the web-server you are using.
Optional settings:
The settings would be editable in the main PHP file (pheditor.php by default). The settings are as below:
- Define patterns for files and directories to view/edit (empty means all files & directories)
- Log file path
- Show/Hide hidden files
- Limit access to the page only for an IP address (empty means access for all)
- Show/Hide main pheditor file (pheditor.php) in files list to edit
- History files path
- Word wrap
- Changing main directory (
MAIN_DIR
) - Enable/Disable Terminal
- Define allowed terminal commands
- Change editor theme (
EDITOR_THEME
) (theme list) - New file and directory permissions (
DEFAULT_DIR_PERMISSION
andDEFAULT_FILE_PERMISSION
)
Using without password:
You can empty the PASSWORD
constant in the source code to access the script without the password. But it is highly recommended to use it and change the default password after installation.
Access Levels and Permissions:
There are eight permissions for users that is defined in PERMISSIONS
constant. You can remove any of them as you need.
Default value: newfile,newdir,editfile,deletefile,deletedir,renamefile,renamedir,changepassword,uploadfile,terminal
If you found this project useful, please consider making a donation to keep this project alive.
Cryptocurrency | Address |
---|---|
Bitcoin | bc1qqjm32eupk7lw3kctlmflqh9spzalya9mqwppw9 |
Ethereum | 0x3d7324f1718fF9f9F57b1d45c80dEdea59F0b412 |
Thanks to: