Professional Web Applications Themes

seeing strange things? - PHP Development

A couple more things and I'll stop bugging everyone. I'm trying to get the file name of the string. If it includes the extension that's fine as well. I thought the code below would do this but its not. $filevalue = str_replace("\\", "/", $filevalue); //get specific file name $parts = explode("/",$filevalue); $file_name = $parts[count($parts)]; //line 42 Its giving me error: Notice: Undefined offset: 6 in c:\inetpub\wwwroot\webpage10\example\u_images\act_ load_imgs.php on line 42 One other thing, after the results, I get on my output screen at the top the word "Array", yet I don't have this anywhere in my output. Even after I ...

  1. #1

    Default seeing strange things?

    A couple more things and I'll stop bugging everyone. I'm trying to get the
    file name of the string. If it includes the extension that's fine as well.
    I thought the code below would do this but its not.

    $filevalue = str_replace("\\\\", "/", $filevalue);

    //get specific file name
    $parts = explode("/",$filevalue);
    $file_name = $parts[count($parts)]; //line 42

    Its giving me error:
    Notice: Undefined offset: 6 in
    c:\inetpub\wwwroot\webpage10\example\u_images\act_ load_imgs.php on line 42

    One other thing, after the results, I get on my output screen at the top the
    word "Array", yet I don't have this anywhere in my output. Even after I
    remove the above code to get rid of the error message, I get this. Anyone
    have any ideas of how I can get rid of this?

    thanks


    Micah Montoy Guest

  2. #2

    Default Re: seeing strange things?

    OK. I think Imp the strange thing seeing things are and I don't think they
    are. Anyway, disregard the last part about the Array. I had an echo
    statement that I was using for testing buried in the code.




    "Micah Montoy" <montmicaisu.edu> wrote in message
    news:20030709003745.66766.qmailpb1.pair.com...
    > A couple more things and I'll stop bugging everyone. I'm trying to get
    the
    > file name of the string. If it includes the extension that's fine as
    well.
    > I thought the code below would do this but its not.
    >
    > $filevalue = str_replace("\\\\", "/", $filevalue);
    >
    > //get specific file name
    > $parts = explode("/",$filevalue);
    > $file_name = $parts[count($parts)]; //line 42
    >
    > Its giving me error:
    > Notice: Undefined offset: 6 in
    > c:\inetpub\wwwroot\webpage10\example\u_images\act_ load_imgs.php on line 42
    >
    > One other thing, after the results, I get on my output screen at the top
    the
    > word "Array", yet I don't have this anywhere in my output. Even after I
    > remove the above code to get rid of the error message, I get this. Anyone
    > have any ideas of how I can get rid of this?
    >
    > thanks
    >
    >

    Micah Montoy Guest

  3. #3

    Default Re: [PHP] seeing strange things?



    Micah Montoy wrote:
    > A couple more things and I'll stop bugging everyone. I'm trying to get the
    > file name of the string. If it includes the extension that's fine as well.
    pathinfo() should do the job for you.

    Marek Kilimajer Guest

Similar Threads

  1. strange things happening..
    By iambrew in forum Macromedia Contribute General Discussion
    Replies: 3
    Last Post: December 28th, 07:20 PM
  2. Strange Things
    By myIP in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: April 29th, 05:32 AM
  3. IIS Security strange things
    By Alexey Smirnov in forum ASP.NET Security
    Replies: 4
    Last Post: March 3rd, 07:48 AM
  4. Strange things in Opera...
    By Steve in forum Macromedia Flash Sitedesign
    Replies: 4
    Last Post: January 7th, 07:44 AM
  5. [PHP] seeing strange things?
    By Mike Ford in forum PHP Development
    Replies: 0
    Last Post: July 9th, 10:12 AM

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