php-general | 2000071
Date: 07/09/00
- Next message: Tyler Longren: "Re: Re: [PHP] Macromedia UltraDev & PHP"
- Previous message: Mark A Mucha: "[PHP] Re: [PHP-INST] Problems w/ APXS script"
- Next in thread: Mark A Mucha: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Reply: Mark A Mucha: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Reply: heinisch: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> $ext = strrchr($_file,'.');
>
> -Rasmus
Hi Rasmus and rest of the list!
I thought my problem was solved, but it is not.
When I try this:
if($ext == ".gif" or " .jpg")
or
if($ext == ".gif" | " .jpg")
or even
if($ext == ".gif" || " .jpg")
It only OK¨s on GIF, not on JPG.
Also, is there a way to ignore case? The extension might be in upper case.
Thank you all for your time.
regards,
Sune Alexandersen
--------------------
Company site: http://www.drs.no
Private site: http://www.suneworld.com
Wap site: http://tagtag.com/suneworld
Download WebExplorer today and manage your PHP
enabled website in your webbrowser! Its free!
http://www.suneworld.com/programs
(over 1.800 downloads since release)
----- Original Message -----
From: Rasmus Lerdorf <rasmus <email protected>>
To: Kevin Beckford <kbeckford <email protected>>
Cc: Sune Alexandersen <sune <email protected>>; GPHP <php-general <email protected>>
Sent: 23. juni 2000 17:38
Subject: Re: [PHP-GENERAL] Setting the filetype!
> On Fri, 23 Jun 2000, Kevin Beckford wrote:
>
> > This code gives the extension as $matches[2]. You can then check to see
what
> > the extension is and code for whatever
> >
> > function check_ext($_file)
> > {
> > if(preg_match("/(\.[^.]*)*(\..+$)/",$_file,$matches));
>
> Wow. Isn't that overkill just to get the extension? How about:
>
> $ext = strrchr($_file,'.');
>
> -Rasmus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Tyler Longren: "Re: Re: [PHP] Macromedia UltraDev & PHP"
- Previous message: Mark A Mucha: "[PHP] Re: [PHP-INST] Problems w/ APXS script"
- Next in thread: Mark A Mucha: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Reply: Mark A Mucha: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Reply: heinisch: "Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

