Jump to content

glob() not coming up with any results...


loren646

Recommended Posts

<img src="/pics/Dan/40 Allen/4/201232313_33.jpg" alt="40allen" width="400" height="400"><br>


<?php
$dir = "/pics/Dan/40%20Allen/4/*";  
  
// Open a known directory, and proceed to read its contents  


foreach(glob($dir) as $file)   
{  
    echo "filename: $file : filetype: " . filetype($file) . "<br />";  
}  


$files = glob("/pics/Dan/40 Allen/4/*.{jpg,gif,png}", GLOB_BRACE);
echo "yo yo".$files[0];


?>
 

I'm trying different ways using %20 and without using %20.

 

Nothing seems to come up. The html works on top. It only prints the picture from the html and the "yo yo"

Link to comment
https://forums.phpfreaks.com/topic/276105-glob-not-coming-up-with-any-results/
Share on other sites

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.