need help with imagejpeg

Discussion in 'PHP' started by lilgezuz, Nov 15, 2011.

  1. #1
    I have a little script I use to resize and watermark my images. After doing that it is suppose to save files to a certain folder and add image path to database. It adds the correct image path and name to database but it doesn't save my image to the server.

    
    $filename1 = "images/games/$id/".$image_name;
    imagejpeg($image1,$filename1,100);
    
    PHP:
    the image script is located in this DIR
    root dir
    mod panel
    image manager

    I want my files saved to
    root dir
    images
    games
    game id

    Any help would be greatful
     
    lilgezuz, Nov 15, 2011 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Is it throwing any errors? Also, is the images/games/$id/ folder writable?
     
    jestep, Nov 16, 2011 IP
  3. lilgezuz

    lilgezuz Active Member

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #3
    The folder is writeable. If I have the script in the root dir it works fine just when I move it to a sub directory it doesnt want to save the image. I'm not sure where to put the code to see if it is throwing out any errors
     
    lilgezuz, Nov 16, 2011 IP