using php to search dir

Reply

Join Date: Sep 2009
Posts: 2
Reputation: railto is an unknown quantity at this point 
Solved Threads: 0
railto railto is offline Offline
Newbie Poster

using php to search dir

 
0
  #1
Sep 11th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,407
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 226
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: using php to search dir

 
0
  #2
Sep 11th, 2009
PHP Directory functions, the examples are in there: http://php.net/dir
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,033
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 131
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster

Re: using php to search dir

 
-1
  #3
Sep 11th, 2009
Also have a look at DirectoryIterator, I posted some info here: http://www.daniweb.com/forums/thread190732.html
Happy Humbugging Christmas
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,497
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: using php to search dir

 
0
  #4
Sep 11th, 2009
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.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - MacGyver Fan
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 2
Reputation: railto is an unknown quantity at this point 
Solved Threads: 0
railto railto is offline Offline
Newbie Poster

Re: using php to search dir

 
0
  #5
Sep 14th, 2009
Originally Posted by cwarn23 View Post
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.
Reply With Quote Quick reply to this message  
Reply

Tags
pdf, php, search

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC