这篇文章主要介绍了PHP获取文件夹内文件数的方法,涉及php操作文件夹及文件的技巧,具有一定参考借鉴价值,需要的朋友可以参考下
本文实例讲述了PHP获取文件夹内文件数的方法。分享给大家供大家参考。具体实现方法如下:
function getfilecounts($ff){ $dir = './'.$ff; $handle = opendir($dir); $i = 0; while(false !== $file=(readdir($handle))){ if($file !== '.' && $file != '..') { $i++; } } closedir($handle); return $i; }
希望本文所述对大家的php程序设计有所帮助。
,
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
