etourslive Posted February 13, 2007 Share Posted February 13, 2007 OK I AM NEW AND I NEED SOME HELP I WAS WONDERING HOW TO CHANGE THE MAX FILE SIZE FOR THIS CODE BECAUSE I WAS TOLD THAT THE DEFAULT IS AUTOMATICALLY 2 MB FOR PHP APPLICATIONS... I NEED AROUND 3 MB ..... PLEASE HELP THANK YOU TRAVIS <?php $ftmp = $_FILES['image']['tmp_name']; $oname = $_FILES['image']['name']; $fname = 'd:/websites/www.twenterprize.com/upload/'.$_FILES['image']['name']; if(move_uploaded_file($ftmp, $fname)){ ?> <html><head><script> var par = window.parent.document; var images = par.getElementById('images'); var imgdiv = images.getElementsByTagName('div')[<?=(int)$_POST['imgnum']?>]; var image = imgdiv.getElementsByTagName('img')[0]; imgdiv.removeChild(image); var image_new = par.createElement('img'); image_new.src = 'resize.php?pic=<?=$oname?>'; image_new.className = 'loaded'; imgdiv.appendChild(image_new); </script></head> </html> <?php exit(); } ?><html><head> <script language="javascript"> function upload(){ // hide old iframe var par = window.parent.document; var num = par.getElementsByTagName('iframe').length - 1; var iframe = par.getElementsByTagName('iframe')[num]; iframe.className = 'hidden'; // create new iframe var new_iframe = par.createElement('iframe'); new_iframe.src = 'upload.php'; new_iframe.frameBorder = '0'; par.getElementById('iframe').appendChild(new_iframe); // add image progress var images = par.getElementById('images'); var new_div = par.createElement('div'); var new_img = par.createElement('img'); new_img.src = '/images/indicator.gif'; new_img.className = 'load'; new_div.appendChild(new_img); images.appendChild(new_div); // send var imgnum = images.getElementsByTagName('div').length - 1; document.iform.imgnum.value = imgnum; setTimeout(document.iform.submit(),5000); } </script> <style> #file { width: 350px; } </style> <head><body><center> <form name="iform" action="" method="post" enctype="multipart/form-data"> <input id="file" type="file" name="image" onchange="upload()" /> <input type="hidden" name="imgnum" /> </form> </center></html> Quote Link to comment Share on other sites More sharing options...
fert Posted February 13, 2007 Share Posted February 13, 2007 http://us2.php.net/manual/en/function.ini-set.php Quote Link to comment Share on other sites More sharing options...
etourslive Posted February 13, 2007 Author Share Posted February 13, 2007 OK I DONT REALLY UNDERSTAND WHAT THAT IS TELLING ME DO I HAVE TO PUT THE CODE: <?php ini_set('output_handler', 'mb_output_handler'); echo "\noutput_handler => " . ini_get('output_handler') . "\n"; ?> SOME WHERE...BUT WHERE? ??? AND WHERE DOES IT DEFINE THE MAX SIZE TRAVIS Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2007 Share Posted February 13, 2007 It's considered rude to use Caps Lock - you're shouting. If you need the font bigger you can fix it on your browser. put ini_set("upload_max_filesize", "8M"); at the top of the script http://us2.php.net/manual/en/ini.core.php#ini.upload-max-filesize Quote Link to comment Share on other sites More sharing options...
etourslive Posted February 13, 2007 Author Share Posted February 13, 2007 ok sorry about the caps... i am new and trying to learn this stuff. i put that ini_set("upload_max_filesize", "8M"); at the top in the middle and even the bottom but no go... any more instite please thanx Quote Link to comment Share on other sites More sharing options...
fert Posted February 13, 2007 Share Posted February 13, 2007 find upload_max_filesize in your php.ini file and change it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.