
May 17th, 2005, 10:59 AM
|
|
|
|
Join Date: Apr 2007
Location: Hot Springs, AR, United States
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Determine filetype then echo text
Ok I'm a really really bad newbie here, but I'm trying like heck to learn this language.
this is a very elementary problem but I'm sure you can help.
I have an upload program written in PHP. It supports uploading many different file TYPES.
On a results page (that does define the filename) i have a couple echo lines that I wrote, so people can just copy and paste the output to a forum, and it will place the right tags for [IMG] tags, and display <img src lines below it.
My problem is that the text i describe shows up regardless of what the file type is.
So what I'm really looking for, is eith a single statement that will grab a list of file extensions and match the uploaded file.
If the extensions match, show the image code, if not, continue.
This should be pretty simple, but the problem I have, is looking at php.net anything i can see corresponding to any image extensions just points to php code on how to create and manipulate the files.
Does this make sense?
|