PHP学习
文章平均质量分 51
触点酷玩
生命因努力奋斗而精彩!
展开
-
PHP面向对象方式操作数据库(扩展增强库MySQLi)
文件:mysqliDemo.php<?php header("Content-type:text/html;charset=utf-8"); //mysqli操作mysql数据库(面向对象风格) //1.创建MySQLi对象 链接数据库 $mysqli = new MySQLi("localhost","root","xxxx","test"); //验证链接是原创 2015-05-31 10:07:20 · 594 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之七(MVC实现用户信息增、删、改、查)
一、项目目录结构: 二、文件Admin.class.php管理员类<?php class Admin{ private $id; private $name; private $password; /** * @return $id */ public function getId() {原创 2015-06-14 14:43:44 · 8405 阅读 · 1 评论 -
使用PHP制作 简易员工管理系统之六(采用分层分页显示用户信息)
一、目录结构图: 二、文件Admin.class.php管理员类<?php class Admin{ private $id; private $name; private $password; /** * @return $id */ public function getId() {原创 2015-06-12 00:09:59 · 2871 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之二(管理员登陆界面以及验证)
一、文件login.php<html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/><TITLE>管理员登陆系统</TITLE><h1>管理员登陆</h1><form action="loginProcess.php" method="post"> <table> <原创 2015-06-02 15:45:37 · 11074 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之五(分页显示用户信息)
一、修改erpList.php文件<html><head><meta http-equiv="content-type" content="text/html;charset=utf-8" /><title>显示用户信息</title><body><?php //显示所有用户信息(表格的形式) //查询数据库 $conn = mysql_connect("loca原创 2015-06-03 00:55:30 · 4245 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之四(完善主界面以及显示员工信息)
一.修改loginProcess.php文件 获取登陆者 信息$sql = "select password,name from admin where id = $id";二、修改erpManager.php获取登陆用户信息 以及完善 此主界面<html><head><meta http-equiv="content-type" content="text/html;charset=utf-8原创 2015-06-02 17:47:26 · 7683 阅读 · 2 评论 -
PHP超全局变量-$_POST
1.文件文件getData.php:<html><head><meta http-equiv="content-type" content = "text/html;charset=utf-8"/><title>用户注册</title></head><body><h1>用户注册</h1><form action="register.php" method="post">用户名:<in原创 2015-06-01 22:45:14 · 882 阅读 · 0 评论 -
PHP超全局变量-$_GET
1.文件getData.php:<meta http-equiv="content-type" content="text/html;charset=utf-8"/><?php $name = urlencode('我爱你'); echo "<a href='getDemo.php?name=".$name."&age=199'>传送数据</a>";?>2.文件getDemo.p原创 2015-06-01 17:03:36 · 603 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之三(管理员登陆界面以及数据库验证)
一、修改login.Process.php<meta http-equiv="content-type" content="text/html;charset=utf-8"/><?php //接受用户的数据 //1.id $id = $_POST['id']; //2.密码 $password = $_POST['password']; //3.数据原创 2015-06-02 16:38:57 · 4915 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之一(创建数据库)
一、首先建立数据库usersDb;create database usersDb;二、建立两张表 admin与userscreate table admin( id int primary key, password varchar(64) not null, name varchar(32) not null);create table users( id int原创 2015-06-02 15:10:51 · 7089 阅读 · 4 评论 -
PHP面向过程方式操作数据库(扩展增强库MySQLi)
文件:mysqliDemo1.php<?php header("Content-type:text/html;charset=utf-8"); //1.得到mysqli链接 $mysqli = mysqli_connect("localhost","root","xxxx","test"); if(!$mysqli){ die("链接失败!".mysq原创 2015-05-31 10:29:56 · 422 阅读 · 0 评论 -
使用PHP实现简易词典查询功能
一、首先 查询界面 代码:<html><head><title>在线词典</title><meta http-equiv="content-type" content="text/html;charset=utf8"/></head><img src="cidian.png"/><h1>查询英文</h1><form action="worldProcess.php" method="p原创 2015-05-31 03:13:06 · 1893 阅读 · 1 评论 -
使用PHP mysqli 扩展增强库(面向对象/数据库操作封装/事务控制/预编译)总结
1、和mysql扩展库的区别: (1 安全性、稳定性更高 (2 提供了面向对象和面向过程两种风格 2、php.ini 中的 extension=php_mysqli.dll 解除封印 3、面向对象:查询列表<?php 3 //mysqli 操作数据(面向对象风格) 5 #1、创建Mysql对象 7 $mysqli=new MySQLi("1转载 2015-05-31 21:20:10 · 870 阅读 · 0 评论 -
使用php实现文件下载
<?php $file_name = "奋斗.jpg"; //php文件函数 比较古老,需要对中文转码 gb2312; $file_name = iconv("utf-8","gb2312",$file_name); //相对路径 //$file_path = "./down/".$file_name; //绝对路径 $file_path = $_SERVERT['DOCMENT_R翻译 2015-05-30 09:38:26 · 479 阅读 · 0 评论 -
使用PHP制作 简易员工管理系统之八(使用COOKIE保存用户登陆id以及显示用户登录时间)
目录结构: 一、新建common.php封装cookie方法:获取上一次访问时间和获取cookie某个key对应的值:<?php function getLastTime(){ date_default_timezone_set('PRC'); // 中国时区 if(!empty($_COOKIE['lastVisit'])){原创 2015-06-15 02:50:36 · 3363 阅读 · 0 评论