摘要: <?php教程 // 上传设置 $maxsize=10002400; //最大允许上传的文件大小 $alltype=array(".php",".php3"); //所有允许上传的文件类型 $imgtype=array(".php",".php3"); //类型 // 判断文件大小 if($_FIL 阅读全文
posted @ 2016-11-28 11:07 韩国服务器-Time 阅读(969) 评论(0) 推荐(0) 编辑
摘要: <?php /** * 基于左右值排序的无限分类算法 * 数据库结果为 CREATE TABLE om_catagory ( CatagoryID int(10) unsigned NOT NULL auto_increment, Name varchar(50) default '', Lft i 阅读全文
posted @ 2016-11-28 11:05 韩国服务器-Time 阅读(514) 评论(0) 推荐(0) 编辑
摘要: /** * xml2array() will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Arguments : 阅读全文
posted @ 2016-11-28 11:02 韩国服务器-Time 阅读(401) 评论(0) 推荐(0) 编辑
摘要: <?function delete_file($file) { if (file_exists($file)) { $delete = chmod ($file, 0777); $delete = unlink($file); if(file_exists($file)) { $filesys = 阅读全文
posted @ 2016-11-28 11:00 韩国服务器-Time 阅读(611) 评论(0) 推荐(0) 编辑
摘要: <?php /* 函数:remote_file_exists 功能:判断远程文件是否存在 参数: $url_file -远程文件URL 返回:存在返回true,不存在或者其他原因返回false */ function remote_file_exists($url_file){ //检测输入 $ur 阅读全文
posted @ 2016-11-28 10:59 韩国服务器-Time 阅读(910) 评论(0) 推荐(0) 编辑
摘要: 关于用php 获取当前脚本的url很多朋友会说很简单,但是要获取很详细的就要经过多次判断哦。 $PHP_TIME = time();$PHP_SELF = isset($_SERVER['PHP_SELF'])2881064151 ? $_SERVER['PHP_SELF'] : (isset($_ 阅读全文
posted @ 2016-11-28 10:56 韩国服务器-Time 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 我们的代码经理是这样的:计算总行数:select count(*) from tablename where …..查询列表select * from tablename where … limit…我们看这种方式再没有任何优化的方式下这样第个列表都是再次查询。首先我们假设数据更新频率不是很高的情况 阅读全文
posted @ 2016-11-28 10:54 韩国服务器-Time 阅读(205) 评论(0) 推荐(0) 编辑
摘要: var_dump(in_array(0, array('s' )); 这句话的结果是bool(true)。 因为in_array会将0 和's' 进行比较,0是number类型,'s'是string类型,根据php教程 manual 中“comparison operators” 一章的说明可知,n 阅读全文
posted @ 2016-11-28 10:51 韩国服务器-Time 阅读(252) 评论(0) 推荐(0) 编辑