关于yii的扩展swfupload的问题 [ 新手入门 ]
view 如下:
<?php
$this->widget('application.vendors.swfupload.CSwfUpload', array(
'jsHandlerUrl'=>'assets/Handlers/handlers.js', //Relative path
'postParams'=>array(),
'config'=>array(
'use_query_string'=>true,
'upload_url'=>'index.php?r=avatar/up', //Use $this->createUrl method or define yourself
'file_size_limit'=>'2 MB',
'file_types'=>'*.jpg;*.png;*.gif',
'file_types_description'=>'Image Files',
'file_upload_limit'=>0,
'file_queue_error_handler'=>'js:fileQueueError',
'file_dialog_complete_handler'=>'js:fileDialogComplete',
'upload_progress_handler'=>'js:uploadProgress',
'upload_error_handler'=>'js:uploadError',
'upload_success_handler'=>'js:uploadSuccess',
'upload_complete_handler'=>'js:uploadComplete',
'custom_settings'=>array('upload_target'=>'divFileProgressContainer'),
'button_placeholder_id'=>'swfupload',
'button_width'=>170,
'button_height'=>20,
'button_text'=>'<span class="button">'.Yii::t('messageFile', 'ButtonLabel').' (Max 2 MB)</span>',
'button_text_style'=>'.button { font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size: 11pt; text-align: center; }',
'button_text_top_padding'=>0,
'button_text_left_padding'=>0,
'button_window_mode'=>'js:SWFUpload.WINDOW_MODE.TRANSPARENT',
'button_cursor'=>'js:SWFUpload.CURSOR.HAND',
),
)
);
?>
<?php echo CHtml::beginForm(); ?>
<div class="form">
<div class="row">
<div id="divFileProgressContainer"></div>
<div class="swfupload"><span id="swfupload"></span></div>
</div>
</div>
<?php echo CHtml::endForm(); ?>
浏览器打开的时候 报错 uncaught exception: Could not find the placeholder element: swfupload 怎么处理,求解
共 2 条回复
w454638 安徽
注册时间:2011-03-23
最后登录:2015-02-25
在线时长:0小时19分
最后登录:2015-02-25
在线时长:0小时19分
- 粉丝0
- 金钱180
- 威望0
- 积分180