parcours de fichiers


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $d = dir("/home/eric/public_html/test/k");
  2. $kml = "";
  3. while($entry = $d->read()) {
  4. $contenu = fread(fopen($d->path .'/'.$entry, "r"), filesize($d->path .'/'.$entry));
  5. $placemark = preg_match('/<placemark[^>]*>.+<\/placemark>/i', $contenu, $temp);
  6. $kml .= $temp[0];
  7.  
  8. }
  9. $d->close();
  10. echo $kml;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.