a3522665 2012-12-11 17:11:28 3117次浏览 2条回复 0 0 0

[attach]1007[/attach]

<?
$this->widget('application.extensions.swfupload.CSwfUpload', array(
    'jsHandlerUrl'=>'/js/handler.js', //Relative path
    'postParams'=>array(),
    'config'=>array(
        'use_query_string'=>true,
        'upload_url'=>'/path/to/controller/action', //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',
        ),
    )
);
?>

看过 舰长发的swfupload 帖子 实在是不是哪里错了 麻烦帮我看看 为什么不显示 一片空白 是路径的问题吗

  • 回复于 2012-12-11 19:10 举报

    一般是路径的问题。可以自己调试一下~

  • 回复于 2012-12-12 13:23 举报

    是啊 我觉得也是路径问题 但是我试过了 怎么的也 不显示 麻烦你看看 我的文件位置 和 写的路径

您需要登录后才可以回复。登录 | 立即注册