943,678 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2248
  • PHP RSS
Sep 11th, 2009
0

using php to search dir

Expand Post »
Hi guys and gals,

Im working on a project at present where i need to be able to upload a batch of apporx 400 files each week.

What i need the script to do is, when a driver enters his number and a pin that the script will then search all the filenames for his driver number and display a list of them in date order with clickable links so that they can be viewed, the files are all pdf.

Really hope someone can help with this.

I have been told that it needs to have minimal input from IT dept after its setup, basically that the only human intervention is accounts saving the files to a netdrive and drivers are then able to find them.

Thanks in advance

mark
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
railto is offline Offline
2 posts
since Sep 2009
Sep 11th, 2009
0

Re: using php to search dir

PHP Directory functions, the examples are in there: http://php.net/dir
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Sep 11th, 2009
-1

Re: using php to search dir

Also have a look at DirectoryIterator, I posted some info here: http://www.daniweb.com/forums/thread190732.html
Sponsor
Featured Poster
Reputation Points: 1048
Solved Threads: 945
Sarcastic Poster
ardav is offline Offline
6,672 posts
since Oct 2006
Sep 11th, 2009
0

Re: using php to search dir

Quote ...
Im working on a project at present where i need to be able to upload a batch of apporx 400 files each week.
I hope it's not a windows server your using because when I attempted to create over 500,000 folders and subfolders with php, it crashed the external hardrive and had to be formatted. I would VERY strongly suggest to use a database instead as it will be faster and may even reduce the load on your server due to the file system lookup.
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Sep 14th, 2009
0

Re: using php to search dir

Click to Expand / Collapse  Quote originally posted by cwarn23 ...
I hope it's not a windows server your using because when I attempted to create over 500,000 folders and subfolders with php, it crashed the external hardrive and had to be formatted. I would VERY strongly suggest to use a database instead as it will be faster and may even reduce the load on your server due to the file system lookup.
Site runs on external Linux web server, was thinking about mysql, but we will be putting up approx 400 PDF's a week to server and storing them in a DB might not be the best idea. It is something that i through about, but it will also cause either 1 of 2 things, 1 I have to write a script to take the PDF's from local storage to the mysql db and sort them, or 2 i am going to have to upload them all myself, both of which are less than ideal.

I need to be able to save down a batch of pdf's with the correct naming convention (thats simple) and have them uploaded to the webserver (netdrive) and then a simple query to find the relevant files and display them to the user as a link.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
railto is offline Offline
2 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: File Upload
Next Thread in PHP Forum Timeline: .htaccess not working for url rewrite





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC