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
Install using composer:
composer create-project pheditor/pheditor
or just upload pheditor.php
to your web host (and/or rename it as you wish).
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
)
Hotkeys:
- New File
Ctrl (CMD) + Shift + N
- Save File
Ctrl (CMD) + Shift + S
- Switch between file manager, editor and terminal
Esc
- Double press
Esc
to open file menu - Double click on file name to view in browser window/tab.
- Find
Ctrl (CMD) + F
- Find next
Ctrl (CMD) + G
- Find previous
Shift + Ctrl (CMD) + G
- Replace
Shift + Ctrl + F
orCMD + Option + F
- Replace all
Shift + Ctrl + R
orShift + CMD + Option + F
- Persistent search
Alt + F
- Go to line
Alt (Option) + G
- Toggle Terminal
Ctrl (CMD) + Shift + L
- Terminal history (Up & Down arrow keys)
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 | Donate |
---|---|---|
Bitcoin | bc1qqjm32eupk7lw3kctlmflqh9spzalya9mqwppw9 |
TrustWallet |
Ethereum | 0x3d7324f1718fF9f9F57b1d45c80dEdea59F0b412 |
TrustWallet |
Thanks to: