This class is not safe. need to be corrected? Php/*** HttpDownLoad *** @ authorsanshiQQ: 35047205 Email: sanshi0815@tom.comMSN: sanshi0815@tom.com *** @ version1.0.02005/07/10 *** @ deprecated1.h
This class is not safe and needs to be corrected
/**
* HttpDownLoad
*
* @ AuthorSanshi
QQ: 35047205
Email: sanshi0815@tom.com
MSN: sanshi0815@tom.com
*
* @ Version1.0.0 2005/07/10
*
* @ Deprecated
1. http download
*/
Class HttpDownLoad
{
Var $ rootDom = 'd:/jsp/'; // sets the download directory.
Var $ openDir; // open the correct path
Var $ open; // directory to be opened
Var $ enter = 3; // Set line feed
Var $ table_w = 800; // you can specify the table width.
Var $ div = array (); // sets the directory to store arrays.
Var $ file = array (); // sets the array for storing files.
Var $ link = array (); // sets the array of connected files.
// Structure function
Function HttpDownLoad ()
{
$ This-> getAll ();
$ This-> head ();
$ This-> printArray ($ this-> dir, 'Directory ');
$ This-> printArray ($ this-> file, 'file ');
$ This-> foot ();
}
// Set the output header
Function head ()
{
Echo'
Table_w. ''align = 'center'>
| |
'.'
| Www.litou.com | '.'
| Author: Sanshi |
'.'
| Contact method:Sanshi0815@tom.com | > '.'
| Q: 35047205 |
';
}
// Set the end.
Function foot ()
{
}
// Obtain the directory to be opened
Function getOpen ()
{
$ Open = $ _ GET ['dir'];
$ This-> open = $ open;
If (! Isset ($ open) | empty ($ open ))
{
$ OpenDir = $ this-> rootDom;
} Else {
$ OpenDir = $ this-> rootDom. $ open .'/';
}
$ This-> openDir = $ openDir;
Return $ openDir;
}
// Split the contents in the directory
Function getAll ()
{
$ OpenDir = $ this-> getOpen ();
$ Handle = opendir ($ openDir );
While ($ allFile = readdir ($ handle ))
{
If (is_dir ($ openDir. $ allFile ))
{
$ This-> dir [] = $ allFile;