![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
常用函数
花落乱了流年
一直野生的程序员
展开
-
字符串去html标签函数
strip_tags() 第一个参数:需要处理的字符串参数 第二个参数:可以不被去除的列表原创 2017-04-07 15:31:01 · 413 阅读 · 0 评论 -
删除某目录下所有文件
能不能删除文件夹还不知道 function deleteAll($path) { $op = dir($path); while(false != ($item = $op->read())) { if($item == '.' || $item == '..') { con原创 2017-03-14 16:00:56 · 876 阅读 · 0 评论 -
计算某个文件夹中的文件个数
function getFileCounts($dir){ $handle = opendir($dir); $i = 0; while(false !== $file=(readdir($handle))){ if($file !== '.' && $file != '..') {原创 2017-03-14 16:02:42 · 807 阅读 · 0 评论 -
php 把数据导入excel表格中
function exportToExcel($datas){ //实例化 include_once("PHPExcel/PHPExcel.php"); include_once("PHPExcel/PHPExcel/IOFactory.php"); $title=_lang_resume原创 2017-06-23 16:44:56 · 631 阅读 · 0 评论 -
js 端验证文件是否存在
function fileExist(FileURL){ if(window.ActiveXObject){ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }else if (window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); } ...原创 2018-04-03 10:09:00 · 760 阅读 · 0 评论