2014年11月19日

摘要: array_walk_recursive() 例子 'apple', 'b' => 'banana');$fruits = array('sweet' => $sweet, 'sour' => 'lemon');function test_print($item, $key){echo "$key... 阅读全文
posted @ 2014-11-19 20:13 相依相偎不相弃 阅读(108) 评论(0) 推荐(0)

2014年11月18日

摘要: display("essay"); } function add_essay() { date_default_timezone_set('Asia/Shanghai'); $M=M("essay"); $data=$_POST; $data['publishtime']=date('y-m-... 阅读全文
posted @ 2014-11-18 20:43 相依相偎不相弃 阅读(206) 评论(0) 推荐(0)

2014年11月17日

摘要: display(); } function into_add() { date_default_timezone_set('Asia/Shanghai'); $M=M("user"); $data=$_POST; $data['in_date']=date('y-m-d H:i:s',time... 阅读全文
posted @ 2014-11-17 19:20 相依相偎不相弃 阅读(192) 评论(0) 推荐(0)

2014年11月14日

摘要: path=$path; $this->files=$files; $this->seterror=1; $this->allowtype=array("jpg","gif","JPG","png","jpeg"); $this->filetype=array(); $this->filen... 阅读全文
posted @ 2014-11-14 19:20 相依相偎不相弃 阅读(149) 评论(0) 推荐(0)

2014年11月13日

摘要: filename=$files['name']; $types=explode(".",$this->filename); $this->filestype=$types[count($types)-1]; $this->filessize=$files['size']; $this... 阅读全文
posted @ 2014-11-13 20:47 相依相偎不相弃 阅读(120) 评论(0) 推荐(0)

2014年11月12日

摘要: table=$table; $this->pagesize=$pagesize; $sql="select * from ".$this->table.""; $query=mysql_query($sql); $num=mysql_num_rows($query); $this... 阅读全文
posted @ 2014-11-12 19:44 相依相偎不相弃 阅读(146) 评论(0) 推荐(0)

2014年11月11日

摘要: array_flip()例子 1, "b" => 1, "c" => 2);$trans = array_flip($trans);print_r($trans);?> 答案:Array( [1] => b [2] => c)array_values() 例子 "XL", "color"... 阅读全文
posted @ 2014-11-11 19:40 相依相偎不相弃 阅读(99) 评论(0) 推荐(0)

2014年11月10日

摘要: array_diff_key() 例子 1, 'red'=> 2, 'green'=> 3, 'purple' => 4);$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'=> 8);var_dump(array_dif... 阅读全文
posted @ 2014-11-10 20:38 相依相偎不相弃 阅读(141) 评论(0) 推荐(0)

2014年11月9日

摘要: 1 2 First //第一页3 {if $pagerInfo.currentPage > 1} //如果当前页大于1,则有pre链接4 Pre5 {else}6 Pre7 {/if}8 index+1} //index从0开始计数10 {$pindex}11 {/section}12 {i... 阅读全文
posted @ 2014-11-09 19:50 相依相偎不相弃 阅读(145) 评论(0) 推荐(0)