2015-10-18 php 对象方法变量 php 对象方法变量 // 类的方法传参,相当于$height就是局部变量,只能用在函数height里面class Xiao{function height($height){echo "身高是{$height}<br/>";} }$jun=new Xiao();$jun->height('165cm'); 2015-10-18 日志 743 阅读 0 评论 2015年10月18日 743 阅读 0 评论
2015-10-18 php ODP预处理机制笔记 php ODP预处理机制笔记 //php 预处理机制header('content-type:text/html;charset=utf-8');$pdo=new PDO("mysql:host=localhost;dbname=blong","root","root"); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC); $pdo->exec("set names utf8"); /* $sql="delete from v9_yuyue where id=?";$arr=arry(1,3,4,5);foreach($arr as $val){$obj=$pdo->prepare($sql);$obj->bindValue(1,$val);} */$sql2="insert into v9_yuyue(name,sex,age,content) v... 2015-10-18 日志 753 阅读 0 评论 2015年10月18日 753 阅读 0 评论
2015-10-18 JS获取浏览器和屏幕的宽高 JS获取浏览器和屏幕的宽高 //获取浏览器文档区的宽高var htmlw=document.documentElement.clientWidth;var htmlh=document.documentElement.clientHeight;//返回顶部代码window.onscroll=function(){var winScrollH=document.documentElement.scrollHeight;//总高度var winClientH=document.documentElement.clientHeight;//可视高度var winScrollTop=document.documentElement.scrollTop;//滚动高度 2015-10-18 日志 693 阅读 0 评论 2015年10月18日 693 阅读 0 评论
2015-10-18 JS检查客户端使用什么浏览器_笔记 JS检查客户端使用什么浏览器_笔记 <div> <button id="bid">检查浏览器</button> </div> <script type="text/javascript"> $id("bid").onclick=function(){ var wind=navigator.userAgent; &... 2015-10-18 日志 729 阅读 0 评论 2015年10月18日 729 阅读 0 评论
2015-10-18 linux nginx虚拟机主机,禁止某个IP配置 linux nginx虚拟机主机,禁止某个IP配置 把这段代码放到nginx安装目录配置文件nginx.conf,http{}中,不能放在默认server{}中,否则会报错,或服务失败,静止某个IP和某段IP也是放在自己的虚拟主机配置下server {listen 80;server_name www.php.com; #这个www.php.com是自己的域名index index.html index.htm index.php;root /home/free/nginx/www/www_php_com; #这个是这个域名所对应的安装目录 location ~ \.php$ { &nbs... 2015-10-18 日志 776 阅读 0 评论 2015年10月18日 776 阅读 0 评论