摘要: mysql连接操作//建立连接$con = mysql_connect('localhost', 'root', '123456');//判断是否连接成功if($con){ die('连接失败!'.mysql_error()); exit;} //选择字符集mysql_set_char... 阅读全文
posted @ 2014-10-26 18:24 庸人自扰ym 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * relativePath 计算两个文件的相对路径 3 * @param file1 参作为考路径 4 * @param file2 相对于$file1的路径 5 */ 6 function relativePath($file1, $file2){ ... 阅读全文
posted @ 2014-10-26 18:14 庸人自扰ym 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 1 '; 19 getDirFile($path.'/'.$file); 20 } else { 21 if($file != '.' && $file != '..'){ 22 echo '文件:'.$file.''; 23 ... 阅读全文
posted @ 2014-10-26 17:47 庸人自扰ym 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: 前台页代码: 1 2 3 4 5 6 7 8 9 10 11 12 后台处理代码: 1 $size){25 $result['ms... 阅读全文
posted @ 2014-10-26 17:37 庸人自扰ym 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 排序算法:(1)冒泡排序 1 $arr = array(15,8,20,50,37,85,10,5,11,4); 2 //冒泡排序 3 function maoPao($arr){ 4 for($i = 0; $i $arr[$j+1]){ 7 $t... 阅读全文
posted @ 2014-10-26 17:12 庸人自扰ym 阅读(189) 评论(0) 推荐(0) 编辑