A file management feature is added to the project to allow users to maintain their own static HTML files.
Found a ready-made online PHP file management tool on the Internet: webftp:http://down.chinaz.com/soft/30675.htm
Some questions were found after downloading:
- He must be logged in before he can use
- No restrictions on uploaded file types
- The interface is not very easy to embed in the project
- Specify your own file action path
I changed him a bit. Basically to meet my needs.
login Problem , change his login page to log in automatically.
file Limit , modify the filters value in the \webftp\static\js\webftp.upload.js file. Modify \webftp\core\filefs.class.php to add the following code where the file is uploaded:
$ext=Strtolower($_files[' File '] [' Name ']);$ext=Explode("." ,$_files[' File '] [' Name ']);$ext=End($ext);$ext _list=Array(' JS ', ' png ', ' jpg ', ' html ', ' TPL ', ' CSS '); if(!In_array($ext,$ext _list)){ $TIHS->error = ' File ext error! '; return false;}
interface , it is good to directly modify the index.php file.
The effect is as follows:
Modify the file action path modify the ' root_path ' = ' and './storage/a1/' and C (' Root_path ', ' in \webftp\init.php. Storage/a1/');
Download: Http://files.cnblogs.com/zjfree/webftp.rar