Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] Re: [PHP-GENERAL] Setting the filetype! From: Sune Alexandersen (sune <email protected>)
Date: 07/09/00

Mark wrote:
> if($ext == ".gif" || $ext == " .jpg")

Thanks Mark, so I really have to do a complete test each time? Phew! That
can be a long line:)

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: Mark A Mucha <mmucha <email protected>>
To: php-general <php-general <email protected>>; Sune Alexandersen <sune <email protected>>
Sent: 9. juli 2000 22:24
Subject: Re: [PHP] Re: [PHP-GENERAL] Setting the filetype!

> if($ext == ".gif" || $ext == " .jpg")
> ----- Original Message -----
> From: "Sune Alexandersen" <sune <email protected>>
> Cc: "GPHP" <php-general <email protected>>
> Sent: Sunday, July 09, 2000 6:18 PM
> Subject: [PHP] Re: [PHP-GENERAL] Setting the filetype!
>
>
> > > $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>
> >
>
>
> --
> 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>