PHP uploader only uploads Small files -



PHP uploader only uploads Small files -

my php code upload little files eg, 20mb when seek upload files more homecoming nil insert database anyway. have tried putting upload size doesn't anything. script should upload swf file , image while inserting info database used. why can't upload more 20mb.

<?php $link = $_post['link']; if(isset($_post['upload'])) { $allowed_filetypes = array('.swf'); $max_filesize = 999999999999999999999999999999999999999999999; $upload_path = 'swf/'; $game = $_post['game']; $category = $_post['category']; $swf = $_post['swf']; $height = $_post['height']; $width = $_post['width']; $radio=".swf"; $characters = '0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; $done = ''; ($i = 0; $i < 25; $i++) $done .= $characters[mt_rand(0, 61)]; $filename = $done . '' . $radio; $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); if(!in_array($ext,$allowed_filetypes)) die('the file attempted upload not allowed'); if(filesize($_files['userfile']['tmp_name']) > $max_filesize) die("the file attempted upload large"); if(!is_writable($upload_path)) die('you cannot upload specified directory, please chmod 777. '); if(move_uploaded_file($_files['userfile']['tmp_name'],$upload_path . $filename)) { $query = "insert image (title, description) values ($filename, $description)"; mysql_query($query); echo 'game added successfully'; $doney = $website . '' . $filename; echo "<br/>"; echo $doney; $result = $upload_path . '' . $filename; } else { echo 'there error during file upload. please seek 1 time again later.'; } } ?> <br/> <?php if(isset($_post['upload'])) { $allowed_filetypes = array('.jpg'); $max_filesize = 999999999999999999999999999999999999999999999999999999; $upload_path = 'gameimg/'; $game = $_post['game']; $category = $_post['category']; $swf = $_post['swf']; $height = $_post['height']; $width = $_post['width']; $radio=".jpg"; $characters = '0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; $done = ''; ($i = 0; $i < 25; $i++) $done .= $characters[mt_rand(0, 61)]; $filename = $done . '' . $radio; $link="/game?id=".$done; $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); if(!in_array($ext,$allowed_filetypes)) die('the file attempted upload not allowed'); if(filesize($_files['filez']['tmp_name']) > $max_filesize) die("the file attempted upload large"); if(!is_writable($upload_path)) die('you cannot upload specified directory, please chmod 777.'); if(move_uploaded_file($_files['filez']['tmp_name'],$upload_path . $filename)) { $query = "insert image (title, description) values ($filename, $description)"; mysql_query($query); echo 'game added successfully'; $doney = $website . '' . $filename; echo "<br/>"; echo $doney; $resulty = $upload_path . $filename; } else { echo 'there error during file upload. please seek 1 time again later.'; } } ?>

clearly, server not back upwards big files. utilize phpinfo(); see contents of php.ini file. check upload_max_filesize in phpinfo(). located under core section of php info. edit : check post_max_size located under core section of phpinfo (pointed out in comments @thesexiestmaninjamaica ). , check post_max_size pointed out in comments 1 time again @ceejayoz

php file-upload

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -