phpcms_v9 1. [文件] phpcms_v9-表单向导增加文件上传.txt~1KB 下载 (19) 1.打开目录 ./phpcms/modules/content/fields/ ;把 文件夹downfile,拷贝到目录./phpcms/modules/formguide/fields/里面。2.打开文件 ./phpcms/mo
          1. [文件] phpcms_v9-表单向导增加文件上传.txt ~ 1KB 下载(19)
1.打开目录 ./phpcms/modules/content/fields/ ;把 文件夹downfile,拷贝到目录./phpcms/modules/formguide/fields/里面。
2.打开文件 ./phpcms/modules/formguide/fields/fields.inc.php ,在数组$fields添加值 'downfile'=>'文件上传';
3.打开文件./phpcms/languages/zh-cn/formguide.lang.php ,添加如下内容
    $LANG['upload_soft']                                =        '上传文件';
4.修改form.inc.php文件
原
    $string .= $str."<input type='text' name='info[$field]' id='$field' value='$value' class='input-text' style='width:80%'/>  <input type='button' class='button' onclick=\"javascript:flashupload('{$field}_downfield', '".L('attachment_upload')."','{$field}',submit_files,'{$upload_number},{$upload_allowext},{$isselectimage}','content','$this->catid','{$authkey}')\"/ value='".L('upload_soft')."'>";
改为
    $string .= $str."<input type='text' name='info[$field]' id='$field' value='$value' class='input-text' style='width:80%'  readonly='readonly' />  <input type='button' class='button' onclick=\"javascript:flashupload('{$field}_downfield', '".L('attachment_upload')."','{$field}',submit_attachment,'{$upload_number},{$upload_allowext},{$isselectimage}','content','$this->catid','{$authkey}')\"/ value='".L('upload_soft')."'>";
5.删除 output.inc.php 这个文件,否则下载地址会一直输出数组
6.input.inc.php改为
    function downfile($field, $value) {
            return trim($value);
    }
7.更新缓存添加字段就好
        
        