随笔分类 -  PHP

php实现简单的验证码功能
摘要:$fontcolor=imagecolorallocate($image,rand(0,100),rand(0,100),rand(0,100));//随机的rgb()值可以自己定 $fontcolor=imagecolorallocate($image,rand(0,100),rand(0,100 阅读全文

posted @ 2017-09-03 18:13 Freeloop_嘉 阅读(8766) 评论(0) 推荐(0)

CI框架下PHP读取mySQL数据库
摘要:1.在application/config/database.php 中填写好数据库的相关内容 包括hostname username password database 等 2.新建一个文件 application/controllers/GuanliCon.php 代码如下 <?php clas 阅读全文

posted @ 2016-10-15 18:01 Freeloop_嘉 阅读(1740) 评论(0) 推荐(0)

CI框架下部分简单的后台管理代码
摘要:1.control层: GuanliCon层次 代码如下: <?phpdefined('BASEPATH') OR exit('No direct script access allowed'); class GuanliCon extends CI_Controller{ public funct 阅读全文

posted @ 2016-10-11 20:57 Freeloop_嘉 阅读(2215) 评论(1) 推荐(0)

php实现读取mySQLl数据库并进行最简单分页
摘要:<html> <?phpheader("Content-type:text/html;charset=utf-8");//中文防止乱码error_reporting(0);$page=$_GET['p']; //$pageSize='5'; $host="127.0.0.1";$username=" 阅读全文

posted @ 2016-09-06 18:58 Freeloop_嘉 阅读(489) 评论(0) 推荐(0)

简单使用PHP读取mySQl数据库
摘要:<?php header("Content-type:text/html;charset=utf-8"); $link=mysqli_connect('localhost','ye',''); // localhost可用127.0.0.1代替 mysql链接名为ye 密码为空值 mysqli_se 阅读全文

posted @ 2016-08-20 17:43 Freeloop_嘉 阅读(621) 评论(0) 推荐(0)