Welcome Guest, Not a member yet? Register   Sign In
Multiple File Upload with Codeigniter + Uploadify
#2

[eluser]vitoco[/eluser]
THe problem is in your view, you close the array too early , find "// ERROR IN CODE"

[quote author="Marlon Souza" date="1274491619"]Hello everyone, I am developing an application for multiple file uploads.

I saw this link (http://vimeo.com/10951360) that the guy got to do, seeing the video, followed and copied the code is generating more error, someone already managed to upload multiple files.

A error is
Parse error: syntax error, unexpected T_DOUBLE_ARROW in [...]/welcome_message.php on line 49

------------------------------

View:

------------------------------
welcome_message
------------------------------
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Mercadão da Cidade - Ribeirão Preto&lt;/title&gt;
&lt;?php
echo $css;
echo $src;

$uploadpath="";
$uploadpath=str_ireplace($_SERVER['DOCUMENT_ROOT'],"", realpath($_SERVER['SCRIPT_FILENAME']));
$uploadpath=str_ireplace("index.php","",$uploadpath);
                                
?&gt;
[removed]
    $("document").ready(function()){
        $('#uploadifyit').uploadify({
                uploader: '&lt;?=$this->config->item('site');?&gt;/system/application/uploadify/uploadify.swf',        
                script: '&lt;?=$this->config->item('site');?&gt;/system/application/uploadify/uploadify.php',
                cancelImg: '&lt;?=$this->config->item('site');?&gt;/system/application/uploadify/cancel.png',
                folder: '&lt;?=$this->config->item('site');?&gt;/images/multiplo',
                scriptAcess: 'always',
                multi:true,
                'onError':function(a,b,c,d){
                    if(d.status=404)
                        alert('Not File');
                    else if(d.type==="HTTP")    
                        alert('Error'+d.type+': '+d.info);
                    else if(d.type==="Size error")
                        alert(c.name+' '+d.type+' Limite'+Math.round(d.sizeLimit/1024)+'Kb');
                    else
                        alert('Error'+d.type+': '+d.text);                        
                },
                'onComplete' : function(event,queueID, fileObj, response, data){
                    $.post('&lt;?php echo site_url('welcome/uploadify');?&gt;',{filearray: response},function(info){ $("#fileinfotarget").append(info);});
                },
                'onAllComplete': function(event,data){
                
                }
            });    
        });
    }
[removed]
&lt;/head&gt;
&lt;body&gt;
<div align="center">
    &lt;?php echo form_open_multipart("upload/index");?&gt;
    <p><label for="filedata">Upload file(s)</label><br />
&lt;?
    // ERROR IN CODE ...WAS HERE array('name'=>'filedata' ...
?&gt;
    &lt;?=form_upload(array('name'=>'filedata','id'=>'uploadifyit'));?&gt;
    <a href="[removed]$('#uploadifyit').uploadifyUpload();">Upload file(s)</a>

    </p>
    &lt;?php echo form_close();?&gt;
    <div id="fileinfotarget">
    
    </div>
</div>
&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
Multiple File Upload with Codeigniter + Uploadify - by El Forum - 05-21-2010, 02:26 PM
Multiple File Upload with Codeigniter + Uploadify - by El Forum - 05-21-2010, 09:48 PM
Multiple File Upload with Codeigniter + Uploadify - by El Forum - 05-24-2010, 11:19 AM
Multiple File Upload with Codeigniter + Uploadify - by El Forum - 05-24-2010, 01:19 PM
Multiple File Upload with Codeigniter + Uploadify - by El Forum - 05-24-2010, 01:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB