Free multi-user file upload voting system without database 1
WBOYOriginal
2016-07-29 08:34:31960browse
This is an integrated uploading and voting system that I recently developed. It consists of 4 php and several record files. This is the first view.php, which is mainly responsible for displaying the file list, uploaded file form and file name verification. .The addresses in it are all real addresses. Please modify them accordingly when using them. I will provide specific usage methods in the last article.
<script> <br>function opennewwin(url){ <br>window.open(url,null, "height=200,width=200,status=no,toolbar=no,menubar=no,location=no"); <br>} <br>function check(theform){ <br>var tempstr=theform.upfile.value.split("" ); <br>var files=tempstr[tempstr.length-1].split("."); <br>if(theform.writer.value=="" || theform.upfile.value=="" ){alert(" The author and file name cannot be empty"); event.returnValue= false; } <br>if(escape(tempstr[tempstr.length-1]).indexOf("%u")!=-1){ <br>alert("File The name cannot be Chinese"); <br>event.returnValue= false; <br>} <br>if(files.length<2 || (files[1]!="rar" && files[1]!="zip")){ <br> alert("The file name must end with lowercase zip or rar"); <br>event.returnValue= false; <br>} <br>}<br></script>
//col is the column, when there is $uploadto/$col.if (record title), $col.ip, $col .ipd, legal when $col.lst // //page is the number of pages 1-n //rowperpage is the number of rows per page if(!$page) $page=0; $rowperpage=5; if(!$col) die("System error"); $cgiroot="http://eccct.51.net/cgi-bin/";//The location of this php $uploadto="../ uploadfile/".$col."/"; $fp=@fopen($uploadto.$col.".if","r") or die("System error"); $title=fread($fp ,filesize($uploadto.$col.".if")); fclose($fp);//$title is the name of this upload $recfile=$uploadto.$col.".lst"; $fp =@fopen($recfile,"r") or die("System error"); $info=explode(">",fread($fp,filesize($recfile))); fclose($fp) ; $maxpage=ceil((sizeof($info)-1)/$rowperpage); if(!$maxpage) $maxpage=1; if($page>$maxpage||$page<1)$page =1; echo "
The above has introduced the multi-user file free upload voting system without a database 1, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement:
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