PHP File searching
Posted: Tue Oct 10, 2006 8:08 am
I am writting a small application and needing some help.
I will be given a number and i have to do two things first go to the appropriate file directory
example:
if the number is 3800951 then the directory for that would be "38900951 Trunk Grey" or "3800951 Trunk Blue" im not told or guaranteed the directory name to be the same, only the number but no other directory will have that number.
Once in that directory i need to find a file and return that to the screen of the user it is a pdf file and i have no problem returning pdf files, my problem is getting that file.
example:
if im returning the spec sheet the file name will be "blah blah blah - SPEC.pdf" or operational standard - "blah blah blah - OPT.pdf"
I am guaranteed that all spec sheets will have SPEC.pdf and all op's will have OPT.pdf at the end of the file name, and there will only be one of each in the directory.
I appreciate all help and comments.
I will be given a number and i have to do two things first go to the appropriate file directory
example:
if the number is 3800951 then the directory for that would be "38900951 Trunk Grey" or "3800951 Trunk Blue" im not told or guaranteed the directory name to be the same, only the number but no other directory will have that number.
Once in that directory i need to find a file and return that to the screen of the user it is a pdf file and i have no problem returning pdf files, my problem is getting that file.
example:
if im returning the spec sheet the file name will be "blah blah blah - SPEC.pdf" or operational standard - "blah blah blah - OPT.pdf"
I am guaranteed that all spec sheets will have SPEC.pdf and all op's will have OPT.pdf at the end of the file name, and there will only be one of each in the directory.
I appreciate all help and comments.