自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(70)
  • 收藏
  • 关注

原创 第33次PHP作业---微信公众号连接

namespace Home\Controller;use Think\Controller;class WeixinController extends Controller{    public function index(){              if(IS_GET){  //   接收微信get方式传递过来的            $signature

2017-06-15 15:07:33 418

转载 第32次PHP作业---支付接口

//支付成功后, 支付网站访问的页面namespace Home\Controller;use Think\Controller;class PayController extends Controller {   //空方法, 访问不存在的方法时执行    public function _empty() {        $this->display('Public/4

2017-06-13 17:53:48 303

原创 第31次PHP作业--订单列表

namespace Home\Controller;use Think\Controller;class UserController extends Controller{      public function _initialize() {        //判断是否登录        if (empty($_SESSION['uid'])) {          

2017-06-12 17:40:26 459

原创 第30次PHP作业--确认订单

namespace Home\Controller;use Think\Controller;class SubmitController extends Controller{     public function _initialize() {        //判断是否登录        if (empty($_SESSION['uid'])) {         

2017-06-11 17:53:44 405

原创 第29次PHP作业--购物车

namespace Home\Controller;use Think\Controller;class CartController extends Controller{     public function __initialize() {        //当购物车session不存在,初始化,避免之后直接使用出错              if (!isset($_

2017-06-07 17:48:21 456

原创 第28次php作业-tp框架运用

namespace Admin\Controller;use Think\Controller;class ContentController extends Controller{        public function content(){       $info= M('content')->select();       $this->info=$info;

2017-06-05 20:55:31 296

原创 第27次PHP作业--单页面

namespace Admin\Controller;use Think\Controller;class ContentController extends Controller{        public function content(){       $info= M('content')->select();       $this->info=$info;

2017-06-02 17:27:30 260

原创 第26次PHP作业--TP增删改查

namespace Admin\Controller;use Think\Controller;class UserController extends Controller{    public function _initialize() {        //判断是否登录,没有登录跳转到登录页面        if (empty($_SESSION['adminName'

2017-06-01 17:53:59 287

原创 第25次PHP作业--TP做法

public function dologin(){        $username=I('post.username');        $password=I('post.password');        $arr=array(            'username'=>$username,            'password'=>$password, 

2017-05-31 15:35:06 296

原创 第24次PHP作业---thinkPHP

return array(    //'配置项'=>'配置值'    //显示页面Trace信息    'SHOW_PAGE_TRACE' =>true,     'DEFAULT_MODULE'  =>  'Admin',     'DEFAULT_CONTROLLER' => 'Index', // 默认控制器名称(类)    'DEFAULT_ACTION' => '

2017-05-26 15:14:45 286

原创 第23次PHP作业--MVC

class IndexModel{    public $data=array();    public function __construct(){        $conn=mysqli_connect('localhost','root','','myitem');        mysqli_query($conn,'set names utf8');       

2017-05-25 17:35:39 234

原创 PHP考试

//第一种$open=  fopen(dirname(__FILE__),'/a.txt','r');while (!feof($open)){    echo fgets($open);}fclose($open);//第二种$txt=  dirname(__FILE__).'/a.txt';echo file_get_contents($txt)

2017-05-24 16:13:37 419

原创 第22次PHP作业--抽象类的分页运用

abstract class PageFather{    public $num;    public $hello;    public $list;    public $page;    public $total;    public $totals;    public $ids;    public function __construct($num,

2017-05-23 20:57:54 232

原创 第32次PHP作业--面向对象

class Mysql{   public $webName='localhost';   public $port=':3306';    public $adminName='root';    public $pwd='';    public $number='UTF8';    public $item='myitem';    public $conn;

2017-05-22 16:28:53 270

原创 0516---第20次PHP作业---分类管理

session_start();date_default_timezone_set('PRC');if (empty($_SESSION["admin"])) {    header('location:login.php');    exit();}?>                require '../function/limitfunc.p

2017-05-16 17:32:57 279

原创 0515----第19次PHP作业----MySQL多表联系

$conn=@mysql_connect('localhost','root','');                           $db=  mysql_select_db('myitem',$conn);                           mysql_query('set names utf8',$conn);                      

2017-05-15 16:30:32 255

原创 0515---第17次PHP作业----缩略图

function thumb($sourceImgPath,$wid="230",$hei="230") { $rootPath = dirname(dirname(__FILE__));$newPath = $rootPath.$sourceImgPath;$sourceImgInfo=getimagesize($newPath);$s_w=$sourceImgInfo[

2017-05-15 16:29:06 231

原创 0515---第十六次作业----水印

function water($bigPath,$pos=5){$rootPath = dirname(dirname(__FILE__));$bigPath = $rootPath.$bigPath;$smallPath=$rootPath .'/images/logo.png';$bigImgInfo=  getimagesize($bigPath);$smallImgIn

2017-05-15 16:28:08 248

原创 0515--第十五次PHP作业---单页面

session_start();date_default_timezone_set('PRC');if (empty($_SESSION["admin"])) {    header('location:login.php');    exit();}?>                require '../function/limitfunc.p

2017-05-15 16:27:10 394

原创 0511---第14次PHP作业--分页函数

function limit($num,$hello='10',$list='1'){                    $total=ceil($num/$hello);              $total=$total>0?$total:1;            $page = isset($_GET['page']) ? intval($_GET['page'])

2017-05-11 17:49:01 327

原创 0510--第13次PHP作业--文件上传验证函数

function files($file) {    if(empty($file)){      $_SESSION['fileerror']=1;      header('location:../after_end/info.php');      exit();    }     switch ($file['error']){        case 0;

2017-05-11 17:47:39 325

原创 0509--第十三次PHP作业---分页函数

function limit($num,$hello='10'){                    $total=ceil($num/$hello);              $total=$total>0?$total:1;            $page = isset($_GET['page']) ? intval($_GET['page']) : 1;    

2017-05-09 17:30:33 520

原创 0508--第十二次PHP作业---MySQL修改

header('content-Type:text/html;charset=UTF-8');function _post($str,$de=''){      return isset($_POST[$str])?htmlspecialchars(trim($_POST[$str]),ENT_QUOTES):$de;}$id=_post('hidden_id');$p

2017-05-08 17:50:23 249

原创 0503--第十一次PHP作业----图像处理

header('content-type:image/png');/*  * */$width=86;$height=38;$img=imagecreatetruecolor($width, $height);$color=imagecolorallocate($img,  rand(0,255), rand(0,255), rand(0,255));image

2017-05-03 15:49:41 293

原创 0502---第十次PHP作业----session操作

session_abort();?>//开启如上        if(empty($_SESSION['username'])){    ?>    登录 注册             }else{         ?>     欢迎     echo $_SESSION['username'];     ?>用户   退出

2017-05-02 15:08:43 327

原创 0428--第九次PHP作业---MySQL保存数据

$conn=@mysql_connect('localhost','root','');if(!$conn){    die('连接数据库失败');}$db=  mysql_select_db('myitem',$conn);$d=time();mysql_query('set names utf8',$conn);mysql_query('SET character_

2017-04-28 17:21:20 304

原创 0427---第八次PHP作业--MySql

$conn = @mysql_connect("localhost","root","");    if (!$conn){    die("连接数据库失败:" . mysql_error());}   //可以不带连接句柄变量,若不带,为最新创建的数据库服务连接  $dbSelect=@mysql_select_db("myitem",$conn);    mysql_q

2017-04-27 15:22:31 280

原创 0426---第七次PHP作业---日期

header('content-Type:text/html;charset=UTF-8');/* *  *///1date_default_timezone_set("America/New_York");echo "美国纽约时间为:";echo "";echo date('Y年m月d日 H:i:s');echo "";date_defau

2017-04-26 15:13:16 326

原创 0425-第六次PHP作业--数组

header('content-Type:text/html;charset=UTF-8');function arrFun($arr) {    $i = 0;    foreach ($arr as $keys => $value) {        if (!is_array($value)) {            echo $keys . "=>" . $val

2017-04-26 10:48:15 278

原创 第五次PHP作业 ajax

$(function(){                               $('#consult').submit(function(){                   $.ajax({                    url:'action/form.php',                    type:'post',           

2017-04-24 16:07:05 283

原创 第四次PHP作业项目正则

header('content-Type:text/html;charset=UTF-8');$post = $_POST;$name=isset($post["username"])?$post['username']:exit("还想耍我?滚回注册菜单。");$name = empty($post["username"])?exit("你根本输都没输用户名"):$post["use

2017-04-24 16:05:46 194

原创 第三次PHP作业

header('content-Type:text/html;charset=UTF-8');// isset()可以检测所查变量是否存在,empty()可以查询所查值是否为空,包括是否存在,是否为零等,is_null可以查询值是否为空值。$way = __FILE__;echo strrchr($way, ".");$str = '锲而舍之,朽木不折;锲而不舍,金石可镂'

2017-04-20 15:15:27 261

原创 第二次PHP作业

echo $_GET["title"];            ?>                                    $i= $_GET['id'];        if($i==1){        echo '杀人狂1';        } if($i==2){        echo '杀人狂2';        } if($

2017-04-19 16:22:10 288

原创 第一次PHP作业

title                                       header('content-Type:text/html; charset="utf-8"');//常量不可改,变量可以换值,_FILE_,_FUNCTION_等都是系统常量。$num=0;for($i=0;$i                     if(

2017-04-18 16:27:21 607

原创 0417--前端考试题目

Document           var arr1=[1,2,3,4];   var arr2=[1,3,5];   document.write("合并["+arr1+"]和["+arr2+"]两个数值,");     arr1.push(arr2);      document.write("["+arr1+"]"

2017-04-17 17:06:10 322

原创 0417前端测试题--口风琴

Document    *{margin:0;     padding:0;     font-size:13px;     list-style:none;}.menu{width:210px;      margin:50px auto;      border:1px solid #ccc;}.menu p{height:25px;

2017-04-17 17:03:17 391

原创 0412---jQuery第4.5次作业---正则密码强度

Document            body {             background-color: #ccc;        }        .con {                 margin: 100px auto;                 width: 400px;                 padding: 50px;

2017-04-13 14:54:07 305

原创 0413--jQuery第五次作业---正则表单

Document                * {            padding: 0;            margin: 0;        }        body {           background-color: #ccc;        }        .wrapper {            margin

2017-04-13 14:52:12 392

原创 0411---第五次jQuery作业----东京轮播

Document*{padding: 0;margin: 0;}.all{width: 670px;height: 240px;margin: 100px auto;border: 1px solid red;overflow: hidden;        position: relative;}ul{list-style: non

2017-04-11 16:20:29 292

原创 0410---第四次jQuery作业---键盘换色

Document              body{              width: 100%;              height: 100%;              }                 .all{                  width: 300px;                  height: 200p

2017-04-10 15:58:22 312

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除