最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
[转]php用户登录代码
时间:2011-09-25 编辑:简简单单 来源:一聚教程网
效果图。
index.php教程
代码如下 | 复制代码 |
系统后台登陆 |
数据库教程连接 connect.php
代码如下 | 复制代码 |
$connect=mysql教程_connect("localhost","root","")or die("服务器连接失败"); |
图片验证码 piccheck.php
代码如下 | 复制代码 |
/* * Created on 2011-8-10 * * To change the template for this generated file go to * Window - Preferences - PHPeclips教程e - PHP - Code Templates */ session_start(); $code=rand(0,9).dechex(rand(10,15)).rand(0,9).dechex(rand(10,15)); $_SESSION[pic]=$code; $image=imagecreatetruecolor(50,18); $color=imagecolorallocate($image,0,0,0);//第一次使用调色板,会设为背景颜色 $colortext=imagecolorallocate($image,rand(100,255),rand(100,255),rand(100,255)); imagestring($image,10,rand(1,15),rand(1,5),$code,$colortext); imagegif($image); ?> |
css.css文件
代码如下 | 复制代码 |
@charset "utf-8"; body { |
-
上一个: PHP+MySQL注册登陆代码
-
下一个: 目录递归循环php代码
相关文章
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31
- Laravel异常上下文解决教程 10-24
- php数组查询元素位置方法介绍 10-24