Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6822677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:41:32+00:00 2026-05-26T21:41:32+00:00

The current issue I’m facing is this. I have a directory as such webroot:banners/users/

  • 0

The current issue I’m facing is this.

I have a directory as such webroot:banners/users/

The directory contains user images named as such:

136-20111115001231.jpg
(where "136" equals a users ID and the remaining numbers are a timestamp)

So for instance if we had these stored in our directory:

136-20111115001231.jpg
255-20100228153178.jpg
10-20111003124511.jpg
320-20090130145800.jpg

Is there a way of easily searching for a file in our directory (using PHP) that begins with a specified user id?

For instance, if we wanted to find the user image for $userid (136 for instance) could we do something the equivalent of:

    <?php
    $filename = filefind("banners/users/$userid*.jpg");
    ?>

Which would search for jpegs starting with “136” and return the filename (in this case – 136-20111115001231.jpg).

I had a look at some PHP filesystem references but I’m sure I keep overlooking the function that would do this.

Any help you could give would be brilliant!

My guess is that this is an easy one 🙂

Cheers, Al

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:41:33+00:00Added an answer on May 26, 2026 at 9:41 pm

    You’re looking for glob().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The current issue im facing is comes from the following scenario. I have a
I asked a question earlier about keyhooks in vb.net. My current issue is such:
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
This is related to another question I asked last week, but the current issue
Where i am working we have the following issue: Our current test procedure is
I have a weird issue with firebug with my current javascript code I have
i have an issue with my current database with mysql. i have over 100
Our current project has ran into a circular dependency issue. Our business logic assembly
I'm dealing with an issue with my current employer that has seriously made me
If we need to issue a bug patch that does not include current development

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.