Ok, what I'm trying to do is this.
on Tlejftp.com, I want to only display certain codes if it's a certain file type.
First, it will always show the direct link, but if it's a Image type, (jpg, png, gif) display the BBcode for the image, and the bbcode for the Thumbnail, (which auto generates from one of my scripts.) If it was a video/music, I want to embed it, and show embed code. I know how to show all the stuff, I just can't figure out how to only show certain things, for certain file types.
It would be something like
if $filetype == "jpg"
{
echo (all my codes that I want to display for jpg..)
}
I don't know how to get the file type, but I have tried several ways and none seem to work.
Thanks if you can help!
PHP Help please.
- -Legendary-
- Posts: 2272
- Joined: Mon Aug 02, 2004 8:06 pm
- Location: SC
- Contact:
Re: PHP Help please.
http://www.w3schools.com/php/php_if_else.asp
Unless you were after how to actually get the uploaded file's type?..
Unless you were after how to actually get the uploaded file's type?..
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
Halo 3 Research Thread - Contribute to the research into Halo 3.
Legendary doesn't understand the concept of adapting variables to match what they are in his actual script. If $filetype isn't the variable the script uses (Or in the case I gave you, $filename), then it obviously won't work. It's a very simple substring function to get the file type. I showed you that. The reason it doesn't work is because of the variable names. It helps to have PHP knowledge when coding a PHP script.
- -Legendary-
- Posts: 2272
- Joined: Mon Aug 02, 2004 8:06 pm
- Location: SC
- Contact: