Jump to content

Glob to find all .pdf files above $_SERVER['DOCUMENT_ROOT']


cooldude832

Recommended Posts

so I thought this would work but it returns only the current folder's context for pdfs (tried it with .php also same thing)

<?php
foreach (glob("*.pdf") as $filename) {
    echo "$filename size " . filesize($filename) . "\n<br />";
}
?>
?>

 

Trying to find a pdf on a server and I have no clue where it is how can I get all folders and not just the current working one?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.