SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: storing images

  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Location
    kuala lumpur in malaysia
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    storing images

    $ext = substr("$mainimage", -3, 3);
    $path = "../admin/image/";
    $filename = time().".".$ext;
    $image = $path.$filename;
    //copy($mainimage, $image);
    echo "$mainimage";
    //$exec = exec("cp $mainimage $image");


    When I click onto the image,
    this is what appears

    ./image/123.gif&f
    Helping you to get Certified!
    www.certifyexpress.com
    Ultimate Practice Exam!
    www.certifypro.com

  2. #2
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure what's going on with that, since I don't know where you are getting the image name. I assume it's grabbing an image from upload?

    I use a pretty cool image upload script found at: http://px.sklar.com/code-pretty.html?code_id=111

    It uses php to determine image type (no more substr) and saves wherever you want, with whatever name. You may be able to use some of it.

    Hope this helps


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
  •