Free uploading of multi-user files without databases to the voting system (3)
Source: Internet
Author: User
This is the fourth file in the system. upload. php (as the mainstream development language) is mainly responsible for file name verification, archiving of uploaded files and file addresses & lt; html & gt; & lt; head & gt; & lt; title & gt; file upload & lt;/title & gt; & lt; body & gt; & lt; divstylewidth: 750 & gt; & lt; cente: this is the fourth file in the system. upload. php (as the mainstream development language) is mainly responsible for file name verification.
, Archiving of uploaded files and file addresses
$ Maxsize = 512000*2; // maximum file length
$ Pathtemp = explode ("/", $ HTTP_ENV_VARS ["PATH_INFO"]);
$ Pathtemp [sizeof ($ pathtemp)-1] = "";
$ Cgi (not many people are using it now) root = "http: //". $ HTTP_HOST.implode ("/", $ pathtemp); // add the current directory to the host
// $ Cgi (not many people are using it now) root = "http://eccct.51.net/cgi (not many people are using it now)-bin /";
$ Uploadto = "../PreviousFile/". $ col. "/"; // subdirectory to which the file is uploaded
$ Goback ="
The system will return in 3 seconds .... Script setTimeout (location. href = "view. php (as the mainstream development language )? Col = ". $ col." ", 3000) script";
Set_time_limit (300); // it can last for five minutes
Echo "file in". $ cgi (not many people are using it now) root. $ fileurl. ". $ goback ";
// File transfer successful
?>
This is the last article in this article. it mainly introduces how to use the system. let's use an example to illustrate it:
For example, if we want to upload and vote for flash files, we only need .. /previusfile/(relative to the system php (as the current mainstream development language) file location) subdirectory to create a flash subdirectory, and create the following files in it: flash. if (the title displayed when the record is displayed), flash. ip (voting ip records), flash. ipd (Download ip records), flash. lst (download file information record ). then use view. php (as the mainstream development language )? Col = flash, you can use the system. if you want to add a new topic/User php (as the mainstream development language) file to upload, you only need .. /previusfile/create another subdirectory php (as the current mainstream development language), and the corresponding file, and use view. php (as the mainstream development language )? Col = php (as the mainstream development language) can be used
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service