php需登录的文件上传管理系统

(编辑:jimmy 日期: 2024/9/30 浏览:2)

本文给大家介绍一个不错的需要登录的php 文件上传管理系统,功能简单有需要了解的同学可参考。

代码如下

<"admin";//管理密码
$uploaddir="upload";//上传目录
session_start();
if($_GET['action']=="getcode")
{
 setcode();
 exit();
}
if($_POST['password']==$admin_pw && $_POST['yz']==$_SESSION['yzcode'])
{
 $_SESSION['logined']=$admin_pw;
}
if($_GET['action']=="logout")
{
 $_SESSION['logined']="";
 header("location: ".$_SERVER['PHP_SELF']);
 exit();
}
if($_SESSION['logined']!=$admin_pw)
{
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>请登录</title>
</head>
<body>
<form action="" method="post">
输入密码:<input type="password" name="password" style="width:100px;" /><br />验证字符:<input type="text" style="width:40px;" name="yz" /><a href="#" onclick="document.tzm.src='"><img src="/UploadFiles/2021-04-02/">管理系统开发》。

以上就和大家一起学习了需要登录的php文件上传管理系统,大家可以根据自己爱好对登录进行美化操作,希望大家可以喜欢这篇文章。