PHP分页类(较完美)
摘要:<?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 private $listRows; //每页显示行数 private $limit; //SQL语句使用limit从句,限制获取
阅读全文
posted @
2016-04-28 21:44
奋斗的寒霜
阅读(366)
推荐(0)
phpMyAdmin操作之改管理员密码
摘要:1.登录phpMyAdmin 默认地址:http://localhost/phpmyadmin 2.点击用户按钮 3.往下拉找到修改密码 点执行就修改了 注意: 如果再次登录时报错提示: #1045 - Access denied for user 'root'@'localhost' (using
阅读全文
posted @
2016-04-26 21:53
奋斗的寒霜
阅读(992)
推荐(0)
PHP的图片处理类(缩放、加图片水印和剪裁)
摘要:<!--test.php文件内容--> <?php //包含这个类image.class.php include "image.class.php"; $img = new Image("./images");/* echo $img->thumb("dx.jpg", 1000, 1000, "th
阅读全文
posted @
2016-04-26 20:43
奋斗的寒霜
阅读(1178)
推荐(0)
PHP中的验证码类(完善验证码)
摘要:运行结果: <!--vcode.class.php--> <?php class Vcode { private $width; //宽 private $height; //高 private $num; //数量 private $code; //验证码 private $img; //图像的资
阅读全文
posted @
2016-04-21 22:33
奋斗的寒霜
阅读(255)
推荐(0)
PHP中的验证码类(验证码功能设计之二)
摘要:运行结果: <!--vcode.class.php内容--> <?php class Vcode { private $width; //宽 private $height; //高 private $num; //数量 private $code; //验证码 private $img; //图像
阅读全文
posted @
2016-04-21 21:14
奋斗的寒霜
阅读(235)
推荐(0)
PHP中的验证码类(验证码功能设计之一)
摘要:<!--vcode.class.php内容--> <?php class Vcode { private $width; //宽 private $height; //高 private $num; //数量 private $code; //验证码 //构造方法, 三个参数 function __
阅读全文
posted @
2016-04-21 20:54
奋斗的寒霜
阅读(403)
推荐(0)
PHP中的验证码类(准备篇)
摘要:<!--code.php内容--> <?php //开启session session_start(); include "vcode.class.php"; //构造方法 $vcode = new Vcode(80, 25, 4); //将验证码放到服务器自己的空间保存一份 $_SESSION =
阅读全文
posted @
2016-04-21 20:35
奋斗的寒霜
阅读(199)
推荐(0)
PHP中使用GD库方式画时钟
摘要:<!--demo.html中内容--> <body> <img id="time" src="test.php" /> <script> setInterval(function(){ //让时间动起来 document.getElementById("time").src="test.php?"+
阅读全文
posted @
2016-04-21 20:21
奋斗的寒霜
阅读(360)
推荐(0)
文件下载设置
摘要:<?php $filename = "view.html"; //不是必须的, 设置类型 header("Content-Type:text/html"); //当成附件来处理,浏览器就形成下载或打开,并告知文件名是什么 header("Content-Disposition:attachment;
阅读全文
posted @
2016-04-01 21:24
奋斗的寒霜
阅读(163)
推荐(0)
PHP文件上传类(页面和调用部分)
摘要:<!--upform.html内容--> <form action="upload.php" method="post" enctype="multipart/form-data" > name: <input type="text" name="username" value="" /><br>
阅读全文
posted @
2016-04-01 21:10
奋斗的寒霜
阅读(285)
推荐(0)
文件上传类
摘要:<?php /** file: fileupload.class.php 文件上传类FileUpload 本类的实例对象用于处理上传文件,可以上传一个文件,也可同时处理多个文件上传 */ class FileUpload { private $path = "./uploads"; //上传文件保存
阅读全文
posted @
2016-04-01 21:08
奋斗的寒霜
阅读(263)
推荐(0)
PHP文件上传设置和处理(多文件)
摘要:<!--upload.php文件内容--><?phpheader("Content-Type:text/html;charset=utf-8");/* //原来$_FILES的内容Array( [pic] => Array ( [name] => Array ( [0] => 175_2426_3e
阅读全文
posted @
2016-04-01 20:49
奋斗的寒霜
阅读(330)
推荐(0)