Jump to content

ForumGuy

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.funbucket.co.uk

Profile Information

  • Gender
    Not Telling

ForumGuy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey wildteen88,Craygo theres the code you wanted, can you help or not???
  2. yeah my code works, if you read the post ::) you would find the problem i have is with large file uploads, the php.ini and so on.
  3. [url=http://www.phpfreaks.com/forums/index.php/topic,104755.0.html]http://www.phpfreaks.com/forums/index.php/topic,104755.0.html[/url] try the code in this thread it works fine for me to upload pic  ;) just change the relevant variables and your away ;D
  4. i posted the code like asked....plz help... ??? is there anything else that could restrict the size of the file that i'm uploading? :-\ :'(
  5. ok this is the code, hope it helps  ;) [code]<?php if(isset($_POST['Submit2'])) { $size = 75; // the thumbnail height $sizel = 300; // the image height $filedir = 'uploaded_images/'; // the directory for the original image $thumbdir = 'uploaded_images/thumbs/'; // the directory for the thumbnail image $prefix = 'thumb_'; // the prefix to be added to the original name $mode = '0666'; $userfile_name = $_FILES['image']['name']; $userfile_tmp = $_FILES['image']['tmp_name']; $userfile_size = $_FILES['image']['size']; $userfile_type = $_FILES['image']['type']; if (isset($_FILES['image']['name'])) { $prod_img = $filedir.$userfile_name; $prod_img_thumb = $thumbdir.$prefix.$userfile_name; move_uploaded_file($userfile_tmp, $prod_img); chmod ($prod_img, octdec($mode)); $sizes = getimagesize($prod_img); $aspect_ratio = $sizes[1]/$sizes[0]; //Image resizing if ($sizes[1] <= $size) { $height = $size; $width = abs($height/$aspect_ratio); }else{ $width = $sizes[0]; $height = $sizes[1]; } $destimg=ImageCreateTrueColor($width,$height) or die('Problem In Creating image'); $srcimg=ImageCreateFromJPEG($prod_img) or die('Problem In opening Source Image'); ImageCopyResampled($destimg, $srcimg, 0, 0, 0, 0, $width, $height, $sizes[0], $sizes[1]) or die('Problem In resampling'); ImageJPEG($destimg,$prod_img,75) or die('Problem In saving'); //Thumnail resizing if ($sizes[1] <= $size) { $new_width = $sizes[0]; $new_height = $sizes[1]; }else{ $new_height = $size; $new_width = abs($new_height/$aspect_ratio); } $destimg=ImageCreateTrueColor($new_width,$new_height) or die('Problem In Creating image'); $srcimg=ImageCreateFromJPEG($prod_img) or die('Problem In opening Source Image'); ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die('Problem In resizing'); ImageJPEG($destimg,$prod_img_thumb,50) or die('Problem In saving'); imagedestroy($destimg); } $img_ad_id = $_POST['AdID']; echo " <table width='100%' border='0' cellspacing='1' cellpadding='6'>     <tr>     <td bgcolor='#FFFFFF'> <a href='".$prod_img."' target='_BLANK'> <img src='".$prod_img_thumb."' width='".$new_width."' height='".$new_height."'> </a><br /> click submit to proceed! <form name='form1' method='POST' action='".$editFormAction."'> <input type='hidden' name='AdPicThumb1' value='".$prod_img_thumb."' /> <input type='hidden' name='AdPic1' value='".$prod_img."' /> <input type='hidden' name='AdID' value='".$img_ad_id."' /> <input type='hidden' name='MM_update' value='form1'> <input type='Submit' name='Submit' value='Submit'> </form> </td>     </tr>   </table> "; }else{     echo " <table width='100%' border='0' cellspacing='1' cellpadding='6'>     <tr>     <td bgcolor='#FFFFFF'> <form name='form' method='POST' action='".$_SERVER['PHP_SELF']."' enctype='multipart/form-data'> <input type='file' name='image' size='65'><br /> <input type='hidden' name='AdID' value='".$_GET['AdID']."' /> <input type='Submit' name='Submit2' value='Submit'><br /> </form> </td>     </tr>   </table> "; } ?>[/code]
  6. well basically.... max_execution_time = 10000 max_input_time = 10000 memory_limit = 10000M post_max_size = 8000M upload_max_filesize = 1000M the file i try to upload is 2,298k and it just seems to give no error and is empty...its like the file is too large for post_max_size any ideas? i will post my form if necesary?
  7. if all my parameters for a files upload are correct why doesn't it work? i have all the settings on ridiculous so the file can't be too big or be taking too long....but it still doesn't work? smaller files still work, i just don't grasp the madness of it all..... can someone please help me, PLEASE. i've searched everywhere and can't find anything new on the subject of making the file size acceptable larger, i've done everything i've been directed to do. ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.