phpcms v9 表單添加文件上傳字段
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.”? catid’,'{$authkey}’)\”/ value='”.L(‘upload_soft’).”‘>”;
改為
$string .= $str.”? catid’,'{$authkey}’)\”/ value='”.L(‘upload_soft’).”‘>”;
5.刪除 output.inc.php 這個文件,否則下載地址會一直輸出數組
6.input.inc.php改為
function downfile($field, $value) {
return trim($value);
}
7.更新緩存添加字段
標簽:phpcms, 文件上傳, 表單向導