Im having problems getting this to work..
What I need to do is scan a directory, and search for all images that belong to the member.
Here's the basic process:
A member uploads a photo
If accepted, the photo is automatically renamed by appending the member's name as a prefix (for example, if the photo being uploaded is named mypicture.png, the photo will be renamed to USERNAME_mypicture.png)
Then the photo is saved to the appropriate folder
So here's where I'm stuck...for some reason I am unable to scan or display the images.
The code that I currently am using (and not working) is below:
//path to directory to scan
$dir = 'http://fling-finder.com/tmp/cache/user-photos/';
// Open directory, and proceed to read its contents
foreach(glob($dir) as $file)
{
echo "filename: $file : filetype: " . filetype($file) . "<br />";
}
Can anyone see what I am doing wrong here?
The file and directory permissions are set to 755, if that helps
Thank you!