Home > Backend Development > PHP Tutorial > Bank of Communications credit card points redemption script to establish file exchange function (1)

Bank of Communications credit card points redemption script to establish file exchange function (1)

WBOY
Release: 2016-07-29 08:33:26
Original
1198 people have browsed it

因为工作的原因需要在局域网上安装一个文件交换的东西,也可以作成一个文件上下载的功能块。
用的是php,mysql,apache现将程序编写过程贴出来,因为作这个参考来oso的一些文章,也算是一个补充,
也表达我对前辈们的敬意。
准备工作在你的mysql的yourdatabase库中建一个表upfile
/*上传文件表
CREATE TABLE upfile (
id TINYINT (8) not null AUTO_INCREMENT,  //文件的id号
filename VARCHAR (80) not null,          //文件名
fileshow VARCHAR (80) not null,          //文件说明
date DATE not null,                      //上传日期
uploader VARCHAR (40) not null,          //上传者签名
type VARCHAR (40) not null,              //文件类型(人为定义)    
PRIMARY KEY (id)
)
*/
//这是该程序的主页面,用来显示上载的文件。
//index.php



文件交换



  
    
      
    
  
  
        
文件交换区

      

  
      
      
  
        
                                                                                                                                                                          

$db=mysql_connect("$hostname","$user","$password" )or die("Unable to connect to the database"); //Connect to the library
mysql_select_db("yourdatabse",$db) or die("Unable to open the database");
$sql="select * from upfile";
$result =mysql_query($sql);
if ($myrow = mysql_fetch_array($result))
{
echo "n";
echo "< td>filename< /td>n";
                                                                                                        td>%sn",$myrow[" filename"],$myrow["filename"],$myrow["date"],$myrow["uploader"],$myrow["fileshow"],$myrow["type"]); List all files for download. ​​
    echo "There are no files in the file exchange area
Return";
                                                                                                                  div>



The above introduces the script (1) for establishing the file exchange function of redeeming Bank of Communications credit card points, including the content of redeeming Bank of Communications credit card points. I hope it will be helpful to friends who are interested in PHP tutorials.


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
Upload DateUploaderFile DescriptionFile Type%s%s%s