PHP reads all the same types of files under a directory

time:14-10-07 forum:PHP tools and code
  Suppose I have a lot of XXX.jpg, YYY.jpg, ZZZ.png, aaa.txt
how to read the total number of files for JPG in the Album folder,

[code].lt;? Php

$files =; / / / / other files, such as amendments, etc. If you have a directory, please add an absolute directory. For example, c:/album/*.jpg
echo'total: ', count ($files); / / $files is an array of files.

?.gt; [/code]

prev:PHP garbled problem, UTF-8 (garbled), ve... next:Ji'nan now starts a taxi price of 9 yuan...
post comment
Notice



approved   If you find health food illegal, you...   The walls and towers of the Ji'nan m...   A rural girl's monologue: what's the...   How the deaf and dumb girls become t...   These old photos of Ji'nan, which ha...
rand   Fourteen experiences in programming ...   Using JSON to implement cross domain...   PHP good verification code   PHP upload file code, suitable for b...   Install.php simple production
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com