A1SURF.us Posted November 12, 2010 Share Posted November 12, 2010 I get this error when I try to upload an image file: Array ( [file] => Array ( [name] => 125x125-adwidgetz.com.jpg [type] => image/jpeg [tmp_name] => /tmp/phpeghPVy [error] => 0 [size] => 12739 ) ) The error is somewhere in this class: } elseif(isset($_GET['action']) && $_GET['action'] == 'insert') { $file = str_replace(array('ü', 'ö', 'ä', 'ß', 'Ü', 'Ö', 'Ä', ' ', '/'), array('ue', 'oe', 'ae', 'ss', 'ue', 'oe', 'ae', '-', '-'), $_FILES['file']['name']); $file = preg_replace('![^a-z0-9/_\.]!i', '_', $file); $file = ereg_replace('_+', '_', $file); $file = time().$file; if($_FILES['file']['type'] == 'image/gif' OR $_FILES['file']['type'] == 'image/jpeg' OR $_FILES['file']['type'] == 'image/pjpeg' OR $_FILES['file']['type'] == 'image/png' OR $_FILES['file']['type'] == 'application/x-shockwave-flash' OR strstr($_FILES['file']['type'], 'shockwave-flash')) { move_uploaded_file($_FILES['file']['tmp_name'], _BannerAdManagement_PATH.'images/'.$file); $image_info = getimagesize(_BannerAdManagement_PATH.'images/'.$file); Quote Link to comment https://forums.phpfreaks.com/topic/218526-insert-array-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 12, 2010 Share Posted November 12, 2010 What error? That appears to be a print_r() of the $_FILES array of a successfully uploaded file. Quote Link to comment https://forums.phpfreaks.com/topic/218526-insert-array-error/#findComment-1133643 Share on other sites More sharing options...
A1SURF.us Posted November 12, 2010 Author Share Posted November 12, 2010 Your right it does work. I found the file in my list. How do I get it to show the upload was a success, with bright fancy lights of course, with my current template and a user success echo with a preview of the current uploaded file to better confirm the upload, instead of what looks like an error. The website uses .tpl flat files. Quote Link to comment https://forums.phpfreaks.com/topic/218526-insert-array-error/#findComment-1133647 Share on other sites More sharing options...
BlueSkyIS Posted November 12, 2010 Share Posted November 12, 2010 if ($file_uploaded_okay) { echo "<span style='font-size:42px;font-color:green;font-weight:bold;text-decoration:underline;'>THE UPLOAD WAS SUCCESSFUL!!!!!</span>"; } Quote Link to comment https://forums.phpfreaks.com/topic/218526-insert-array-error/#findComment-1133652 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.