Professional Web Applications Themes

Limit files - filethingie-1.php (0/1) - PHP Development

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 ?!...

  1. #1

    Default Limit files - filethingie-1.php (0/1)

    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 Guest

  2. #2

    Default Re: Limit files - filethingie-1.php (0/1)

    > if ((strtolower(substr(strrchr($filename, "."), 3)) == 'jpg') ||
    (strtolower(substr(strrchr($filename, "."), 3)) == 'tif')) { 


    "Phil McKraken" <com> wrote in message
    news:com... 


    Tex Guest

  3. #3

    Default Re: Limit files - filethingie-1.php (0/1)

    On Sun, 21 Aug 2005 15:24:53 GMT, "Tex John" <com>
    wrote:
     
    >(strtolower(substr(strrchr($filename, "."), 3)) == 'tif')) { [/ref]
    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
    Phil Guest

  4. #4

    Default Re: Limit files - filethingie-1.php (0/1)

    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" <com> wrote in message
    news:com... 
    > >(strtolower(substr(strrchr($filename, "."), 3)) == 'tif')) { [/ref]
    > 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[/ref]


    Tex Guest

Similar Threads

  1. limit editing to individual files
    By stevenjs in forum Macromedia Contribute Connection Administrtion
    Replies: 1
    Last Post: March 7th, 11:11 PM
  2. Limit to number of files in "Combine Multiple Files" option
    By Orrletta_Miller@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 4
    Last Post: June 24th, 09:09 PM
  3. files/directory limit?
    By Todd H. in forum AIX
    Replies: 4
    Last Post: September 17th, 12:35 AM
  4. whats limit of include files ?
    By MFA in forum ASP
    Replies: 4
    Last Post: September 9th, 03:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139