摘要:
<?function delete_file($file) { if (file_exists($file)) { $delete = chmod ($file, 0777); $delete = unlink($file); if(file_exists($file)) { $filesys = 阅读全文
摘要:
<?php /* 函数:remote_file_exists 功能:判断远程文件是否存在 参数: $url_file -远程文件URL 返回:存在返回true,不存在或者其他原因返回false */ function remote_file_exists($url_file){ //检测输入 $ur 阅读全文
摘要:
关于用php 获取当前脚本的url很多朋友会说很简单,但是要获取很详细的就要经过多次判断哦。 $PHP_TIME = time();$PHP_SELF = isset($_SERVER['PHP_SELF'])2881064151 ? $_SERVER['PHP_SELF'] : (isset($_ 阅读全文
摘要:
我们的代码经理是这样的:计算总行数:select count(*) from tablename where …..查询列表select * from tablename where … limit…我们看这种方式再没有任何优化的方式下这样第个列表都是再次查询。首先我们假设数据更新频率不是很高的情况 阅读全文
摘要:
var_dump(in_array(0, array('s' )); 这句话的结果是bool(true)。 因为in_array会将0 和's' 进行比较,0是number类型,'s'是string类型,根据php教程 manual 中“comparison operators” 一章的说明可知,n 阅读全文