For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2005 > Limit files - filethingie-1.php (0/1)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Limit files - filethingie-1.php (0/1)
Phil McKraken

2005-08-21, 7:55 am

Trying to keep this php script from viewing/displaying/working with
ANYTHING except jpg or tiff files.

I was given this:

if (substr(strrchr($filename, "."), 1) != 'php') {
# display
}

on this group but it either is not working or I am putting it in the
wrong place


Help ?!
Phil McKraken

2005-08-22, 6:58 pm

On Sun, 21 Aug 2005 15:24:53 GMT, "Tex John" <john@logontexas.com>
wrote:
[color=darkred]
>(strtolower(substr(strrchr($filename, "."), 3)) == 'tif')) {
Well

very nice. but where do I put it ?
I tried several places, still doesn't work

I am still learning so gimme break :)

Can't make either one of the bits of code do the job. I'm sure I just
need to add something or put it in a specific place.

TIA
Tex John

2005-08-22, 6:58 pm

I have a feeling most of the answers here are going to go over your head.
I'd start with "PHP in 24 Hours" or some such available at any Fry's...no
matter how much I love them, I wouldn't recommend any O'Reilly books I know
about but you'll want them when you finish that one.

No offense, but...you should have figured out you wouldn't find only gifs
and jpgs when the search you were useing was meant to find NOT php files...

John


"Phil McKraken" <tingtejs@hotmail.com> wrote in message
news:l5njg15dc7tu2s6ambbno18cs6sd8r7bqu@
4ax.com...
> On Sun, 21 Aug 2005 15:24:53 GMT, "Tex John" <john@logontexas.com>
> wrote:
>
> Well
>
> very nice. but where do I put it ?
> I tried several places, still doesn't work
>
> I am still learning so gimme break :)
>
> Can't make either one of the bits of code do the job. I'm sure I just
> need to add something or put it in a specific place.
>
> TIA



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com