摘要: 1:检测一个变量是否有设置的函数是否?是否为空的函数是?(2分)2:echo(),print(),print_r()的区别(3分)3:表单中 get与post提交方法的区别?4:session与cookie的区别?5:用PHP打印出前一天的时间格式是2015-8-10 22:21:21(2分)6:能... 阅读全文
posted @ 2015-09-24 22:08 -JackoChan 阅读(477) 评论(0) 推荐(0) 编辑
摘要: --------------------PHP部分---------------------PHP中几个输出函数echo,print(),print_r(),sprintf(),var_dump()的区别1:echo:是语句不是函数,没有返回值,可输出多个变量值,不需要圆括号。不能输出数组和对象,只... 阅读全文
posted @ 2015-09-24 22:07 -JackoChan 阅读(942) 评论(0) 推荐(0) 编辑
摘要: 头:header 内容:content/container 尾:footer 导航:nav 侧栏:sidebar栏目:column 页面外围控制整体布局宽度:wrapper 左右中:left right center 登录条:loginbar 标志:logo 广告:banner ... 阅读全文
posted @ 2015-09-21 22:29 -JackoChan 阅读(212) 评论(0) 推荐(0) 编辑
摘要: //直接通过转换比较; function num1($str){ $num = strlen($str); $res = ''; for($i=0;$i<$num;$i++){ if(strtolower($str[$i]) == $str[$i]){ $res .= strtoupper($str 阅读全文
posted @ 2015-09-21 22:25 -JackoChan 阅读(2325) 评论(0) 推荐(0) 编辑
摘要: //第一种方法 function fz($a){ echo strrev($a); } fz('adfjdlks'); echo '<br />'; //第二种方法 function fz1($n){ $len=strlen($n); $res = ''; for($m=$len-1;$m>0;$m 阅读全文
posted @ 2015-09-21 22:19 -JackoChan 阅读(527) 评论(0) 推荐(0) 编辑
摘要: function ext1($str){ // $info = pathinfo($str); // return $info['extension']; return pathinfo($str, PATHINFO_EXTENSION); } echo ext1('test.abc.html'); 阅读全文
posted @ 2015-09-21 22:16 -JackoChan 阅读(295) 评论(0) 推荐(0) 编辑
摘要: $arr = array(225,220,43,155,562,70,55,150); $count = count($arr)-1; for($i=0;$i<$count;++$i){ for($j=0;$j<$count-$i;$j++){ if($arr[$j]>$arr[$j+1]){ $t 阅读全文
posted @ 2015-09-21 22:11 -JackoChan 阅读(155) 评论(0) 推荐(0) 编辑
摘要: //九九乘法表for($i=1;$i";} 阅读全文
posted @ 2015-09-21 22:04 -JackoChan 阅读(109) 评论(0) 推荐(0) 编辑
摘要: // 假设有个函数,只要传参数进去,就能统计累加的结果function test($n){ if($n==1){ return 1; } return $n+test($n-1);}echo test(10);//用递归输出一个以星星拼凑的K型function digui($n... 阅读全文
posted @ 2015-09-21 22:01 -JackoChan 阅读(614) 评论(0) 推荐(0) 编辑
摘要: $a = 0;for($i=0;$i<=1000;$i++){ $a += $i;}echo $a;这个是比较常用的方法,非常简洁方便,记录记录,嘻嘻! 阅读全文
posted @ 2015-09-21 21:57 -JackoChan 阅读(209) 评论(0) 推荐(0) 编辑