Date: 07/07/00
- Next message: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Previous message: Gabriele Bartolini: "[phplib] Trouble with templates"
- Next in thread: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Reply: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Reply: andreas otto: "Re: [phplib] Extension of Files"
- Reply: NickM: "Re: [phplib] Extension of Files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I want to know if a file ($f) is an image file; i try to extract the extension (.gif or .jpg) of this file but i don't know how i can do it.
If you know how, tell me a part of code of this or an example.
if (isset($FILE)){
$f = $FILE;
if (filesize($f) < $max_file_size){
$complet_file = explode(".", $FILE);
$pos = count($complet_file);
$pos = $pos - 1;
$extension = $complet_file[$pos];
$ext = strtolower($extension);
if (($ext == "gif") || ($ext == "jpg")){
..........
}
Thank You.
- Next message: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Previous message: Gabriele Bartolini: "[phplib] Trouble with templates"
- Next in thread: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Reply: Bjorn Ihrner: "Re: [phplib] Extension of Files"
- Reply: andreas otto: "Re: [phplib] Extension of Files"
- Reply: NickM: "Re: [phplib] Extension of Files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

