PHPCMSV9 single file upload function code

Background There are "multi-file upload" feature, but for some cases, we just need to upload a file, and use multi-file upload function to upload a file, and call a file when you call too much trouble.

So I will do it myself, reference to other field types of sites, finding out the single-file upload function.

V9 coded: UTF8 encoding, GB2312 coding

Instructions:
1, open phpcms \ modules \ content \ fields \ fields.inc.php file, " 'downfiles' => 'file upload'," add a line above:
'File' => 'File Upload'
Save and exit. (Do not use UTF8 format for encoding Notepad, such as the use of professional editor editplus, dreamweaver.)
2, the file compression package file folder to phpcms \ modules \ content \ fields directory.

3, in the background model management, add a field, select the field type is "file upload."

4, update the station's cache.


Template tag call: direct use {$ r [ 'field names you define']} can be.

 

Download: UTF8 encoding , GB2312 coding

 

Guess you like

Origin www.cnblogs.com/yuesha/p/11001969.html