PHP Tutorial Anti-dedecms attachment file Online management system
How to use:
1. Establish the UploadFile directory in the root directory first
2. Value and figure: this is used to upload this picture to the parent window. The value, which is the file name, can be used for input, the picture, the image, for the editor. When you use this feature, the text box before value is populated with the ID value of the parent window. I can normally assign a value when I use a layer to eject this program.
3. Multiple files can be uploaded, if the target directory has the same file, then rename to "file name (n). jpg", and the same name as FCKeditor
Test environment: apache2.2.14 + PHP5.3 + windowswww.bkjia.com
*/
Header ("content-type:text/html; Charset=utf-8 ");
Define ("ROOT", Str_ireplace ('/waityou/'. basename (__file__), ' ", Str_ireplace (" ","/", __file__)));
Define ("Uploadfolder", "/uploadfile/");//upload root directory
define ("_d", $_server[' Document_root ']);
Define ("Allowuploadtype", "gif|jpg|png|txt|doc|xls|ppt|pdf|rar|zip|7z|chm|mp3|mp4|mpg|mpeg|flv|swf");//type of upload allowed
Define ("Maxuploadsize", @ini_get (' upload_max_filesize '));
$act = empty ($_get[' act '])? ': $_get[' act '];
if ($act = = "") {
Html_header ();
} ElseIf ($act = = "Left") {
Left ();
} ElseIf ($act = = ' right ') {
if (!empty ($_post[' Upfolder ')) {
Upload_file (); exit;
}
$dir = Empty ($_get[' folder ')? ": $_get[' folder '];
if ($dir = = ") {
Right (Uploadfolder);
} else{
$del _file = Empty ($_get[' del_file ')? ": $_get[' Del_file '];
if ($del _file = =") {
Open_folder ($dir);
}else{
Delete_file ($del _file);
}
}
}
1 2 3 4 5 6
http://www.bkjia.com/PHPjc/444917.html www.bkjia.com true http://www.bkjia.com/PHPjc/444917.html techarticle PHP Tutorial Anti-dedecms attachment file Online Management system use method: 1. Establish UploadFile directory 2 in the root directory first. Values and graphs: this is used to upload this picture to the parent window. The value of a pass ...