Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default Uploader Script Help! [Rep]

    Well, I have been looking through and adding stuff to various loader php scripts and I am stuck on this one part.

    It uploads the file to the destination [/files] but I want the image / file to show afterwards. How would I do this..?

    Uploader.Php;
    PHP Code:
    <?php
    error_reporting
    (0);
    $filepath getcwd()."/files/";
    if(!
    file_exists($filepath)) {
     
    mkdir($filepath,0777);
    }
    chmod($filepath,0777);
    if(
    move_uploaded_file($_FILES['Filedata']['tmp_name'], $filepath.$_FILES['Filedata']['name'])){
     
    chmod($filepath.$_FILES['Filedata']['name'], 0777);
    }
    ?>
    Config;
    PHP Code:
    <fileFilter value="Word,*.doc;*.rtf,Excel,*.xls;*.csv,PDF,*.pdf,Image,*.png;*.gif;*.tiff;*.bmp;*.jpg;*.jpeg" />
     <
    redirectURL value="/files/$filepath.$_FILES['Filedata']['name']" />
     <
    redirectTarget value="_self" /> 

    +REP to all help!
    Or.. If you can suggest another decent uploader script that will show the link / the image of the file then post here!!
    Last edited by Jahova; 03-05-2008 at 03:43 PM.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  2. #2
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    echo $filepath.$_FILES['Filedata']['name'];

  3. #3
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    You do know that someone could just upload a malicious PHP file to your server and overtake anything?

  4. #4
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Dear, anyone got a decent upload script that I can use then?
    + REP to people with idea's.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:


  6. #6
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Thanks, Repped you both.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  7. #7
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    You do know that someone could just upload a malicious PHP file to your server and overtake anything?
    Your not suppose to tell him that ;/

    About do some good tutorials and explain things pretty well.
    Hi, names James. I am a web developer.

  8. #8
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    TomSpit remind me why you used ; after you gave the file a title. and why is it .Php

    Sorry fi it seems pedantic, it's one of my pet peeves. :rolleyes:
    How could this hapen to meeeeeeeeeeeeeee?lol.

  9. #9
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by PureG View Post
    Your not suppose to tell him that ;/

    About do some good tutorials and explain things pretty well.
    He repped me and thought it was good advice, so don't tell me what I am supposed to do or not.

    Why don't you try to help him then instead of rolling.

    Quote Originally Posted by Hypertext View Post
    TomSpit remind me why you used ; after you gave the file a title. and why is it .Php

    Sorry fi it seems pedantic, it's one of my pet peeves. :rolleyes:
    No one cares about your pet peeves. It works.

  10. #10
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Aw I feel for you being all defensive.
    Hi, names James. I am a web developer.

Page 1 of 2 12 LastLast

Posting Permissions

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