Home > Backend Development > PHP Tutorial > PHP anti-dedecms attachment file online management system (1/6)_PHP tutorial

PHP anti-dedecms attachment file online management system (1/6)_PHP tutorial

WBOY
Release: 2016-07-20 11:08:01
Original
973 people have browsed it

php tutorial anti-dedecms attachment file online management system
How to use:
1. First create the uploadfile directory
in the root directory 2. "Value" and "Picture": This is used to transfer this picture to the parent window. Value, passes the file name, which can be used for input; Picture, passes the image, and is used in the editor. When using this function, first fill in the text box in front of "Value" with the ID value of the parent window. When I use the layer to pop up this program, I can assign values ​​normally.
3. Multiple files can be uploaded. If the target directory has the same file, rename it to "file name (n).jpg", the same naming method 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");//Types allowed to be uploaded
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); 🎜>
1 2 3 4 5 6



http://www.bkjia.com/PHPjc/444917.html

www.bkjia.com

true

http: //www.bkjia.com/PHPjc/444917.htmlTechArticlephp tutorial anti-dedecms attachment file online management system usage method: 1. First create the uploadfile directory in the root directory 2. Value and image: This is used to pass this image to the parent window. Value, passed...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template