随笔分类 -  php

登陆界面设置
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>登录页面</title> <style> body,h2,div{ margin: 0; padding: 0; } #main{ width: 400px; he 阅读全文

posted @ 2017-04-27 15:56 郑腾 阅读(187) 评论(0) 推荐(0)

面向对象select方法
摘要:<?php class Table{ protected $tablename; protected $arrTable; protected $w='';//条件属性 protected $field="*";//查询字段 protected $order=""; function __const 阅读全文

posted @ 2017-03-13 10:58 郑腾 阅读(354) 评论(0) 推荐(0)

继承语句
摘要:<?php class M{ protected $arrData;//所 传递 的 数据 protected $tablename;//数据表名 function __construct($arrData){ $this->arrData=$arrData; $this->tablename=ge 阅读全文

posted @ 2017-03-10 09:30 郑腾 阅读(172) 评论(0) 推荐(0)

while语句(1)
摘要:<?php for ($i=1; $i<=10 ; $i++) { echo $i."-".($i*10)."<br>"; } $i=1; while ( $i<= 10) { echo $i."-".($i*10)."<br>"; $i++; } ?> 阅读全文

posted @ 2016-10-28 15:52 郑腾 阅读(190) 评论(0) 推荐(0)

while语句
摘要:<?php $num=10;//被除数 $cs=2; $str=""; while ($num !=0) { $ys=$num % $cs;//余数 $num=(int)($num / $cs);//商 变成下一次的被除数 $str=$ys.$str; } echo $str; ?> <!-- 余数 阅读全文

posted @ 2016-10-28 15:51 郑腾 阅读(164) 评论(0) 推荐(0)

随机函数
摘要:<?php for ($i=65; $i <=90 ; $i++) { // $k= rand(65,90); echo chr($i)." "; if (($i+1) % 5==0) { echo "<br>"; } } ?> 阅读全文

posted @ 2016-10-21 16:01 郑腾 阅读(148) 评论(0) 推荐(0)