您的位置 首页 php

php遍历文件夹下所有文件

<?php
header("content-type:text/html;charset=utf-8");
function getfiles($path) { 
   foreach (scandir($path) as $afile) {  
      if ($afile == '.' || $afile == '..')   
         continue;       
   if (is_dir($path . '/' . $afile)) {  
          getfiles($path . '/' . $afile);   
     } else {   
         echo $path . '/' . $afile . '<br />';     
   }  
  }
}//简单的demo,列出当前目录下所有的文件getfiles(__DIR__);

文章来源:智云一二三科技

文章标题:php遍历文件夹下所有文件

文章地址:https://www.zhihuclub.com/40.shtml

关于作者: 智云科技

热门文章

评论已关闭

8条评论

  1. 1 switched between two or more types of AHT It is available in oral capsules by prescription only

  2. Recently, a leading veterinary cardiologist who has headed the cardiology department at a major USA veterinary school Cardiologist 1 reiterated the dangers of pre heart failure treatment with diuretics

  3. CrossrefMedlineGoogle Scholar 2 McAlister FA, Lawson FME, Teo KK, Armstrong PW The thoracic duct enters the superior mediastinum behind the aortic arch and subclavian artery, to the left of the esophagus

  4. My earlier visits were listed as missed period visits, so it was covered and all I had to pay was the co- pay

  5. Oncogene transduction is the process by which a gene is captured by a retrovirus Serial passage of a retrovirus that does not carry an oncogene leads with high frequency, to the emergence of new viruses that have transduced oncogenes This model also explains the generation of the vast majority of acutely transforming retroviruses isolated in vivo

  6. Supplements can be safe if your healthcare provider tells you that it is okay to take the supplement, and if it is taken as directed

网站地图