Jump to content

Insert Array Error


A1SURF.us

Recommended Posts

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);

Link to comment
https://forums.phpfreaks.com/topic/218526-insert-array-error/
Share on other sites

:shrug: 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.
Link to comment
https://forums.phpfreaks.com/topic/218526-insert-array-error/#findComment-1133647
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.