Jump to content

Insert Array Error


Recommended Posts

I get this error when I try to upload an image file:

    [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', '-', '-'),
	$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
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
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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