Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get the full filename?

Status
Not open for further replies.

seahorse123

Programmer
Jul 25, 2005
39
0
0
US
I have file uploaded to the server by using move_uploaded_file(), the uploaded files have the different file type(extension name like jpg, gif, pdf...)
Now I want to retrieve these files and have it linked from the webpage, I already have the file name, the problem is how the script knows the file extension in order to link it correctly, for example <a href="abc.jpg">, I already have file name "abc", but how the script detects ".jpg", as the hyperlink <a href="abc"> will not work.
 
At what point are you losing the extension? You should figure that out as maintaining the file extensions should be no hard task.
 
This is too basic to give a reply..
not to be rude, but I think he should read for himself and learn, rather than just getting such simple answers on a spoon.

Olav Alexander Mjelde
Admin & Webmaster
 
Not so much an answer as a question to get him thinking. I gave him no example code, nothing but a question to try and point him in the direction he should be looking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top