Welcome to the Linux community forum and interact with 2 million technical staff to access index. php! DOCTYPEhtmlPUBLIC-W3CDTDXHTML1.0TransitionalENw3.orgTRxhtml1DTDxhtml1-transitional.dtdhtmlxmlns.w3.org1999xhtmlheadmetahttp-equivContent-Type
Welcome to the Linux community forum and interact with the 2 million technical staff> go to index. php! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "plaintext" html xmlns = ".w3.org/5o/xhtml" head meta http-equiv = "Content-Type
Welcome to the Linux community forum and interact with 2 million technicians>
Index. php
Filelist
If (is_dir ($ dir )){
If ($ dh = opendir ($ dir )){
While ($ file = readdir ($ dh ))! = False ){
If ($ file! = "." & $ File! = ""){
Echo"
}
}
Closedir ($ dh );
}
}
?>
$ Dir = 'upload /';
Bytes ---------------------------------------------------------------------------------------
Upload_file.php
Bytes ----------------------------------------------------------------------------------------
If ($ _ FILES ["file"] ["error"]> 0)
{
Echo "Return Code:". $ _ FILES ["file"] ["error"]."
";
}
Else
{
Echo "Upload:". $ _ FILES ["file"] ["name"]."
";
Echo "Type:". $ _ FILES ["file"] ["type"]."
";
Echo "Size:". ($ _ FILES ["file"] ["size"]/1024). "Kb
";
Echo "Temp file:". $ _ FILES ["file"] ["tmp_name"]."
";
If (file_exists ("upload/". $ _ FILES ["file"] ["name"])
{
Echo $ _ FILES ["file"] ["name"]. "already exists .";
}
Else
{
Move_uploaded_file ($ _ FILES ["file"] ["tmp_name"],
"Upload/". $ _ FILES ["file"] ["name"]);
Echo "Stored in:". "upload/". $ _ FILES ["file"] ["name"];
}
}
Header ('HTTP/1.1 301 Moved Permanently ');
Header ('location: files. php ');
?>